This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Pages: 1 - Last Post: 07-Jan-2020 10:29 Last Post By: Laza
jGromit

Posts: 7,771
Registered: 31-Jan-2006
Date range formatting
Posted: 05-Jan-2020 15:52
 
  Click to reply to this thread Reply
Attachment okDates.png (129.6 KB)
Attachment awfulDates.png (142.3 KB)
The date range formatting in Tiger is almost uncontrollable. With a typical U.S. date format of MMM d, yyyy, I get what you see in OKDates.png when the images in the album span more than one month. But when they're in the same month, I get what you see in awfulDates.png.

Please just give us the starting and ending dates (and times, if specified in the format string), using the specified date format. If the starting and ending dates are identical, show only one. But if they differ in any way, show us the full beginning date and full ending date.

Attempts to get fancy with this are clearly not working.

BTW, an option to eliminate the time when putting together the range on the hero image might be nice. A user may want to show time when displaying photo data, but when showing a date range, the time is usually superfluous.
jGromit

Posts: 7,771
Registered: 31-Jan-2006
Re: Date range formatting
Posted: 05-Jan-2020 17:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment weirdDate.png (112.0 KB)
And here's another one, even worse, using a typical European date format of dd-MMM-yyyy HH:mm
Laza

Posts: 2,280
Registered: 6-Sep-2005
Re: Date range formatting
Posted: 06-Jan-2020 09:34   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Sorry, date range can only handle dates. It was a hard to figure out the dates alone, I didn't even try to add time. Perhaps I will add some warning or remove times automatically. The formatter watches spaces slash and dash, I wasn't aware of commas so far.
Laza

Posts: 2,280
Registered: 6-Sep-2005
Re: Date range formatting
Posted: 06-Jan-2020 09:42   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I believe this is what supposed to show with MMM d, yyyy:
Nov 1, 2019 – Jan 5, 2020
Nov 1 – Dec 31, 2019
Dec 1 – 31, 2019
I'll try to fix the function accordingly.
jGromit

Posts: 7,771
Registered: 31-Jan-2006
Re: Date range formatting
Posted: 06-Jan-2020 15:17   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
I don't think it's possible to come up with one solution that works for all regional variations in date formatting. What works for a U.S. style date won't work for a European style date. And there isn't a single style used in either place - there are multiple variations.
Laza

Posts: 2,280
Registered: 6-Sep-2005
Re: Date range formatting
Posted: 07-Jan-2020 10:29   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Yes. I've already made the fix for the comma, and it looks like it should.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums