Dec. 4th, 2003

ravencallscrows: (Callanish)
Have any of you, dear readers, had significant success modifying or creating S2 styles or layers?

I'm currently really annoyed at the S2 documentation for not making clear how to implement some of these nifty little features which *should* be user-customizable.

Specifically, what i want to do is to change the date format- using an custom long style-
set lang_fmt_date_long_day = "%%day%%, %%dayord%% %%month%%, %%yyyy%%"; so that the date displays as Thursday, 4 December, 2003, for example.

Where in the layer do i declare that, and what's the proper syntax for doing so? The docs make it obvious that custom formats are possible, but don't touch on how to declare or use one.

edit: 2:50 p.m.: Problem solved. Found the trick in [livejournal.com profile] component_help. It's how you declare it- like a string literal in C (and C-related languages). Remember to include the spaces on both sides of the =, or it'll fail to compile.
So, to use date and time my way, you'd put this in your layer:
set lang_fmt_date_long = "%%day%%, %%dayord%% %%month%%, %%yyyy%%";
set lang_fmt_time_short = "%%h%%:%%min%% %%a%%.m.";

Profile

ravencallscrows: (Default)
Vanya Y Tucherov

January 2025

S M T W T F S
   1234
567891011
12131415 161718
19202122232425
262728293031 

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 26th, 2025 01:51 pm
Powered by Dreamwidth Studios