gerald_duck: (Default)
Gerald the cuddly duck ([personal profile] gerald_duck) wrote in [site community profile] dw_suggestions2012-12-02 01:13 am

I want the date format "Sat 2012-12-01" (or custom date formats)

Title:
I want the date format "Sat 2012-12-01" (or custom date formats)

Area:
Internationalisation/time and date

Summary:
I always use ISO format dates, so definitely want my journal displayed using those. However, in the context of a blog it's also useful to know on what day of the week a posting or comment was made, so it would be nice to have day-of-week followed by ISO date.

Description:
As per the title, and for the reasons in the summary, I would specifically like the date format "Sat 2012-12-01".

However, I have no idea how many other people would like that specific format. Maybe it would be good instead to provide a mechanism for users to specify custom date and time formats?

There are already existing standards for this, such as the trusty old POSIX strftime ( http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html ), ICU format strings ( http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax ) or the Microsoft one familiar to users of Windows and/or Excel ( http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx ).

It would be good to use one of those rather than reinventing the wheel. My vote would be for ICU, provided that library is available to the DW platform.

Poll #12340 I want the date format "Sat 2012-12-01" (or custom date formats)
Open to: Registered Users, detailed results viewable to: All, participants: 44


This suggestion:

View Answers

Should be implemented as-is.
15 (34.1%)

Should be implemented with changes. (please comment)
5 (11.4%)

Shouldn't be implemented.
2 (4.5%)

(I have no opinion)
21 (47.7%)

(Other: please comment)
1 (2.3%)

[personal profile] swaldman 2012-12-16 09:00 am (UTC)(link)
I think there are two different suggestions lurking here:

1. To add a new date format "Day YYYY-MM-DD".
2. To add a mechanism for users to create their own date formats.

I imagine that the first would be very straightforward. The second might require more work. I'm in favour of the first, and have no particular opinion on the second.

EDIT: Just noticed that there is already a format that looks like "YYYY-MM-DD, Day".
Edited 2012-12-16 09:02 (UTC)

[personal profile] swaldman 2012-12-16 12:53 pm (UTC)(link)
Oh, quite right, I stand corrected! In any case, whether or not there is one that's similar, I still think it's perfectly reasonable to request a new format :-)

[personal profile] boundbooks 2012-12-16 12:38 pm (UTC)(link)
Seconding
liv: Stylised sheep with blue, purple, pink horizontal stripes, and teacup brand, dreams of Dreamwidth (sheeeep)

[personal profile] liv 2012-12-16 10:14 am (UTC)(link)
The thing is, custom date formats are already possible, but right now they require editing layers (the code that generates journal layouts). We haven't changed this stuff since Dreamwidth forked. Should this be fully exposed as an option in the wizard, making it more user-friendly for people who don't want to code their own layers?

I'm kind of inclined against, really. I think custom date format is more relevant to layout designers than individual users. The wizard at the moment already gives 12 different options. OK, none of them matches exactly what you want, and maybe we could tweak them to be more in line with standards. But exposing fully customizable date and time format seems overkill. There's some advantage in being able to expect some degree of consistency across the site in dates being recognizable as dates.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:04 pm (UTC)(link)
Should this be fully exposed as an option in the wizard, making it more user-friendly for people who don't want to code their own layers?

Also, it seems to me that would be quite hard to implement UI-wise because not only you'd have to make it possible to choose any possible format for month, day, etc., but then make it possible to order these as you wish.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:23 pm (UTC)(link)
Our system is close to strftime. Hmm. Adding a custom option is doable. I thought you meant something much more user-friendly. To me, what you suggest is advanced customization which we can do already as liv said but why not?
azurelunatic: Vivid pink Alaskan wild rose. (Default)

[personal profile] azurelunatic 2012-12-16 12:48 pm (UTC)(link)
I am seeing in my head a picker and dragger with the optionsshown prettily on a sidebar and the dragginess like the beta update page, degrading to the codes on a sidebar and a text field, with preview button.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:51 pm (UTC)(link)
That's what I thought about too at first. That's much more sophisticated than anything we have in Customize. Would be neat, thought. I'd love that for module placement.
turlough: large orange flowers in lush green grass ((mcr) rocking out)

[personal profile] turlough 2012-12-16 04:19 pm (UTC)(link)
That would be awesome to have!
msilverstar: (corset)

[personal profile] msilverstar 2012-12-16 05:46 pm (UTC)(link)
+1
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:32 pm (UTC)(link)
The code itself is very simple:

set entry_date_format = "iso";
set lang_fmt_date_iso = "%%da%% %%yyyy%%-%%mm%%-%%dd%%";

The easiest way would be to add it to your current wizard layer (it's the highlighted one at http://www.dreamwidth.org/customize/advanced/layers) but that implies not using the customize interface ever again or re-adding this bit of code every time you do because this layer gets rewritten.

The more permanent way would be to add it to a custom theme layer. It's a bit more complicated but I can walk you through it if you want.
blue_rampion: A blue rose in the rain (Default)

[personal profile] blue_rampion 2012-12-16 12:23 pm (UTC)(link)
I think custom dates could work, but it would have to be on a site-wide level rather than a layout thing - like an option in the account display settings. So basically you set the format you want for dates, and that's how you view all dates regardless of what anyone else does.

I assume there'd be issues with coding it that way though? So I don't know whether that'd work either. But everyone setting their own formats for their journal layouts would definitely be a mess. I don't like the current date format (since to me it reads completely backwards), but with it being consistent I at least don't have to play the 'which number is the month' game.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:37 pm (UTC)(link)
Oh I suggested that option (http://dw-suggestions.dreamwidth.org/350464.html) and it's been bugified but not with custom formats.
blue_rampion: A blue rose in the rain (Default)

[personal profile] blue_rampion 2012-12-16 12:39 pm (UTC)(link)
Oh, by 'bugified' does that mean it is viable?
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:43 pm (UTC)(link)
Yeah, it's just replicating the option we have for 24H time display (you can set it side-wide at account settings, but also on on your own journal; site-wide will override everything but your journal when you're logged in).
blue_rampion: A cartoon tiger: "I'm a tiger! I roar, I hunt, I climb, I eat, I wash, I sleep" (Tiger)

[personal profile] blue_rampion 2012-12-16 12:46 pm (UTC)(link)
Oooh, I see!

...I am rather hoping we can get that for dates now. It'd certainly make trying to read them much easier for me.
nonethefewer: (Default)

[personal profile] nonethefewer 2012-12-16 06:51 pm (UTC)(link)
"There's some advantage in being able to expect some degree of consistency across the site in dates being recognizable as dates."

Two things stand out for me:

1) There's an option to view all journals and such in my own style, site-wide. All dates are perfectly consistent to me, in that they're all formatted the way I look at them.

2) That covers within DW, but not without -- as in, people who aren't logged into DW for some reason or another. But, there's not a whole lot of variation in how dates are formatted (reference). The biggest issue I've ever had is dealing with non-US/-Canadian places, that use DMY instead of MDY for the order of things.

Granted, this is pre-coffee me, so perhaps I'm missing something.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-12-16 12:12 pm (UTC)(link)
I have no opinion on adding a new format (I tried to pick the most common ones when I implemented this option but there were so many it was hard to choose) but I don't think custom formats are doable as I said above.
montuos: cartoon portrait of myself (Default)

[personal profile] montuos 2012-12-16 02:34 pm (UTC)(link)
I was looking for this exact format just a couple of days ago when I changed my theme!
sapphoatsunset: (Default)

[personal profile] sapphoatsunset 2013-02-06 03:45 am (UTC)(link)
I was just about to suggest this! So glad to see it already suggested! :)