Category talk:Wren-date: Difference between revisions

→‎Source code: Some further changes.
(→‎Source code: Couple more tweaks.)
(→‎Source code: Some further changes.)
Line 44:
static rawDate { "yyyy||mm||dd" }
static usDate { "mm|/|dd|/|yyyy" }
static ukDate { "dd|/|mm|/|yyyy" }
static timeOnly { "hh|:|MM|:|ss" }
 
Line 265:
 
weekDay { __days[dayOfWeek-1] } // as a string
 
monthName { __mths[month-1] } // ditto
 
number { _num } // gets the number of miiliseconds since Date.zero
Line 300 ⟶ 302:
str = str + Date.zeroFill_(2, parts[1]) // 2 digit month
} else if (f == "mmm") {
str = str + __mths[parts[1]-1]monthName[0..2] // abbreviated month name
} else if (f == "mmmm") {
str = str + __mths[parts[1]-1]monthName // full month name
} else if (f == "d") {
str = str + "%(parts[2])" // minimum digit day
Line 308 ⟶ 310:
str = str + Date.zeroFill_(2, parts[2]) // 2 digit day
} else if (f == "ddd") {
str = str + __days[parts[2]-1]weekDay[0..2] // abbreviated day name
} else if (f == "dddd") {
str = str + __days[parts[2]-1]weekDay // full day name
} else if (f == "ooo") {
str = str + Date.ord_(parts[2]) // ordinal day number
9,488

edits