[personal profile] sharpiefan posting in [community profile] style_system
Being British, I don't like the way that the date in comments in my journal is displayed the American way, with the month first. Is there any way of changing it from '10-24-2010' to either '24/10/2010' or '24th Oct 2010'?

Date: 2010-10-24 06:19 pm (UTC)
thedeadcat: Dead Cat Harvest Cat (Default)
From: [personal profile] thedeadcat
Uhm. Yes. Mine was actually British until I switched it back. (Only because first thing in the morning I am easily baffled, as my brain runs on caffeine and the tank is empty at that point.)

*goes poking* I swear I remember where this is...

It appears that I don't remember where the function is. Dammit! I hope someone replies to this who's smarter than I am on a Sunday.

Date: 2010-10-24 08:32 pm (UTC)
matgb: (British)
From: [personal profile] matgb
I am British, and my layout says this entry was posted Oct. 24th, 2010 18:52.

So, um, yeah. I know it's possible, at least on Tabula Rasa based layouts. I'll go have a poke.

Date: 2010-10-24 08:44 pm (UTC)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)
From: [personal profile] matgb
Oh, wait. In comments.

I have checked, mine displays wrong as well, I'd never noticed. This must be fixed.

I cannot find it as an option anywhere, which suggests it doesn't exist. I will investigate further.

Date: 2010-10-24 09:32 pm (UTC)
sporky_rat: A Dreamsheep on a flowerstalk, dreaming of Dreamwidth. Text: Sporky Energy Ball (ENERGY BALL)
From: [personal profile] sporky_rat
I just put this in as a suggestion.

Date: 2010-10-24 09:52 pm (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Never noticed that, either, until you said so. US time on entries, British on comments. How...special. I just looked through the customization wizard and my layers (and DW FAQs and some DW Coalition documentation) and I can't find a thing to change/modify...I know on certain layouts on LJ (Smooth Sailing comes to mind, maybe some others) the customization wizard let you decide the time display format yourself...
Edited Date: 2010-10-24 09:54 pm (UTC)

Date: 2010-10-24 10:10 pm (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
It comes down to (or wait...it might, but I don't really know) something that's set in here:

http://www.dreamwidth.org/customize/advanced/layersource?id=97851

Specifically:

##===============================
## Display settings - text
##===============================

propgroup text_child {
property string[] datetime_format_group {
des = "Date and time format";
grouptype = "datetime";
}
set datetime_format_group = ["date_format", "time_format"];
property string date_format {
des = "Date";
values = "%%yyyy%%.%%mm%%.%%dd%%|2010.31.01|%%dd%%.%%mm%%.%%yyyy%%|01.31.2010|%%dd%%.%%mm%%.%%yy%%|01.31.10|%%mm%%.%%dd%%.%%yyyy%%|31.01.2010|%%mm%%.%%dd%%.%%yy%%|31.01.10|long|January 31st, 2010|long_day|Sunday, January 31st, 2010";
grouped = 1;
}
property string time_format {
des = "Time";
values = "short|06:30pm|%%HH%%:%%min%%|18:30";
grouped = 1;
}
property string character_before {
des = "Symbol or character to display before links in modules and before entry metadata";
}
}

set date_format = "%%yyyy%%.%%mm%%.%%dd%%";
set time_format = "short";
set character_before = "♦ ";


But my s2-fu is all out of whack so I can barely recall what I'm looking at there...I'm just thinking it's wrong somehow - but why it would flip UK users US-formatted dates on entries and UK-formatted comments and vice versa for US users is quite beyond me...I'm thinking it's something else going on that isn't in the above code (maybe...I just had to find and copy the code I know of that controls date-time format into one of these comments or I was going to rip my hair out for wanting to look at it).


Edited Date: 2010-10-24 10:13 pm (UTC)

Gets worse...

Date: 2010-10-24 10:20 pm (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
The date-time is in US format on view-recent (for me, anyway, as a US user), but not on reply mode pages or on individual comments themselves; those flip to UK format.

Re: Gets worse...

Date: 2010-10-24 10:34 pm (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
It's not specific to DW, if that makes it any better (how it flips for UK and US users might be specific to DW, but not the rest of it)...I just checked, and the behavior is exactly the same on LiveJournal. Which makes it an old, old bug (perfectly ancient, in fact).

Re: Gets worse...

Date: 2010-10-25 02:20 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Well, I'm not sure what layout you use on LJ, but I checked [livejournal.com profile] s2_bloggish and it displays the date/time in US format on entries and in UK format on comments and in reply mode.
Edited Date: 2010-10-25 02:21 am (UTC)

Re: Gets worse...

Date: 2010-10-25 10:26 am (UTC)
twisted_times: Dreamwidth logo  done with red stiching on greyish background. (DW)
From: [personal profile] twisted_times

I'm a UK user and the initial post has the date listed as Oct. 24th, 2010 18:52.

Your comment is listed as 2010-10-24 23:25 (local).


Personally, I'd prefer dates to be listed as dddd/mmmm/yyyy, e.g. Monday 25th October 2010.

Date: 2010-10-25 10:18 am (UTC)
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
From: [personal profile] ninetydegrees
Something that'll make you happy I hope: there's already a bug filed to make it possible to customize the date and time format in your journal - an use non-US formats - and I hope I'll be able to work on it soon. Unfortunately, styles bugs are sometimes connected so you have to put some on the backburner till others get fixed. And I'll stop rambling now. :)

Edit: and to answer your question, you need to add this to a theme or a user layer:

function Comment::time_display (string datefmt, string timefmt) : string {
return $this->time_display("med", $timefmt, false);
}
Edited Date: 2010-10-25 10:25 am (UTC)

Date: 2010-10-25 10:30 am (UTC)
twisted_times: Black on white image of a tiger seen from head on, walking directly towards the viewer. (Tiger)
From: [personal profile] twisted_times

Out of curiosity, will "non-US formats" also include thing like Jewish, Muslim, Japanese and Chinese calendars?

Date: 2010-10-25 10:40 am (UTC)
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
From: [personal profile] ninetydegrees
No, they won't. This bug only concerns formatting. If you want to be able to have dates written in a non-Gregorian calendar (and other types of numerals than the ones currently used), you'll have to suggest it.

Date: 2010-10-25 12:13 pm (UTC)
twisted_times: A grey yin-yang like symbol, but with a pentagon and a golden apple incribed with the word "Kallisti" replacing circles. (Sacred Chao)
From: [personal profile] twisted_times

Fair enough - I can imagine a few people would like to have alternative date formats, and/or dual date format displays. IIRC, there's a specific chunk of Perl or PHP coding that does it automatically.

Date: 2010-10-25 02:17 pm (UTC)
twisted_times: Black on white image of a tiger seen from head on, walking directly towards the viewer. (Tiger)

Date: 2010-10-28 03:31 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Oh, thank you for this. When I get a chance I'll work on the code (or just add it - does this "fix" the date/time format to US or UK throughout, or am I missing something - since I don't see the format written out in the code?). :)

Date: 2010-10-28 01:29 pm (UTC)
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
From: [personal profile] ninetydegrees
This will make the time in comments display in the same format you have on your entries.

The format is set to "med". Med is a pre-set format which corresponds to "Oct. 28th, 2010".

Date: 2010-10-29 02:55 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Oh, OK. Will give it a shot - thanks. :)

ETA: works like a charm! Lovely to have an answer to the problem I never knew I had until I read the OP - thanks again.
Edited Date: 2010-10-29 03:00 am (UTC)

Profile

Dreamwidth style system discussion

April 2025

S M T W T F S
  12345
6 78910 1112
13 141516171819
2021 2223242526
27282930   

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 8th, 2025 08:28 am
Powered by Dreamwidth Studios