Locale Short and Narrow same format



  • Hi,

    I'm using Qt Locale in one of my js functions but I'm getting the same format for ShortFormat and LongFormat.

    I've tried testing it using

    console.log(Qt.locale("en-US").dateFormat(Locale.NarrowFormat));
    console.log(Qt.locale("en-US").dateFormat(Locale.ShortFormat));
    console.log(Qt.locale("en-US").dateFormat(Locale.LongFormat));

    and i get the output

    M/d/yy
    M/d/yy
    dddd, MMMM d, yyyy

    Is there a reason it yields the same format?
    (I've also tried in different languages)

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean Short and Narrow ? If so, they can have the same value. See QLocale::FormatType


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.