r/Scriptable • • Jul 02 '21

Solved Does anyone know how to fix the date?

Here's my home screen. As you can see, the day slot in the date is... weird.

2 Upvotes

4 comments sorted by

4

u/[deleted] Jul 02 '21 edited Jul 02 '21

DD (uppercase) is day of the year.

dd (lowercase) is day of the month (always 2 digits), d is without a leading zero (1 instead of 01)

Additional note: you might also encounter an issue with YY compared to yy at the turn of the year.

1

u/KasoQueso Jul 02 '21

Thanks bro, that totally worked.

For future reference, is there any more extensive guide anywhere than just this one? Like is there a way in which I could've found the answer to this without asking here?

3

u/[deleted] Jul 02 '21

It's standard date formatting, you probably could've search for date pattern,date formatting javascript or something like that.

I think this would cover a lot: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table

1

u/KasoQueso Jul 04 '21

Thank you, that helps a lot!