Documentation

formatting

Format Strings

The following format specifiers are supported for formatting dates:

Format SpecifierDescriptionResult
YYear in four digits2053/२०५३
yYear in two digits(53/५३)
mMonth in two digits with leading zero (01-12/०१-१२)01-12/०१-१२
nMonth in one or two digits without leading zero (1-12/१-१२)1-12/१-१२
MMonth in three letters (Jan-Dec)Jan-Dec
FMonth in full name (January-December/बैशाख-चैत्र)January-December/बैशाख-चैत्र
dDay in two digits with leading zero (01-31/०१-३२)01-31/०१-३२
jDay in one or two digits without leading zero (1-31/१-३२)1-31/१-३२
DDay in three letters (Sun-Sat/आइत-शनि)Sun-Sat/आइत-शनि
lDay in full name (Sunday-Saturday/आइतबार-शनिबार)Sunday-Saturday/आइतबार-शनिबार
SDay in two letters (st, nd, rd, th)st, nd, rd, th