https://bugzilla.wikimedia.org/show_bug.cgi?id=68872
Bug ID: 68872
Summary: (mw.language:formatDate) Return table if format is
"*t"
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: Scribunto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
I found that frequently I need to get time table (a table with fields "year",
"month", ...) of a timestamp in the wiki's local time. It is not possible to
obtain this table via os.date() because the function can't accept timestamp as
a parameter, and the function also can't deal with the wiki's local time. The
workaround is to do something like:
timetable = {
year = tonumber(lang:formatDate(...)),
month = tonumber(lang:formatDate(...)),
day = tonumber(lang:formatDate(...)),
hour = tonumber(lang:formatDate(...)),
...
}
which is redundant and ridiculous. I therefore propose that timetable can be
obtained via lang:formatDate('*t', timestamp, local).
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l