مۇنازىرىلەر » Greasy Fork قا ئىنكاس

Can we get proper date-time formats?

q1k
§
يوللانغان ۋاقتى: 2021-04-12
تەھرىرلەنگەن ۋاقتى: 2021-04-12

Right now all dates show in month/day/year, and time with AM/PM
I'd prefer if the date was in the day,month,year format and time in the 24H, or at least show the month with letters.

Also, I'd like today and yesterday to keep that, but include the time as well,
the "--ago" days to be shown in the full format if it's this year,
And the year to be shown too if it's not this year.

Here's some examples,
12/04/2021 13:00
will be: Today, 13:00

11/04/2021 23:00
will be: Yesterday, 23:00

10/04/2021 23:00
will be: 10 Apr, 23:00

10/04/2020 23:00
will be: 10 Apr 2020, 23:00

Additionally, the "ago" should be shown if it's the past 1 hour, but not more.
I'd like to point out that the full format should always be used for dates of the previous year (such as, if today's date is 1st of January)

Edit:
I meant to post this in script creation as this is custom. So if it can be moved that would be nice.

§
يوللانغان ۋاقتى: 2021-04-12
تەھرىرلەنگەن ۋاقتى: 2021-04-12

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.