Module talk:WikidataIB: Difference between revisions

Content deleted Content added
Format Dates: Calls to getValue for dates
Date handling: new section
Line 259:
: Does that make sense? Let me know if you're still having problems. Cheers --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 02:03, 16 January 2017 (UTC)
::Thanks, will process this. Could this be in the documentation? Sort of basic "required parameters" list? To me, the description & examples there are already quite abstract (into high end usage). Quite an object that requires studying. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 09:16, 16 January 2017 (UTC)
 
== Date handling ==
 
If more extensive date handling is ever needed, consider [[Module:Date]] which can parse dates in various formats, including a Wikidata date, and perform date arithmetic. However, the module is limited to four-digit years. The template {{tl|extract}} can be used for quick tests although it does not expose options to choose the BC/BCE format.
*<code><nowiki>{{extract|+2016-06-21T14:30:00Z}}</nowiki></code> → {{extract|+2016-06-21T14:30:00Z}}
*<code><nowiki>{{extract|+2016-06-21T14:30:00Z|show=ymd}}</nowiki></code> → {{extract|+2016-06-21T14:30:00Z|show=ymd}}
[[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 23:41, 20 January 2017 (UTC)