Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:ISOdate/doc: Difference between revisions

Template page
mNo edit summary
Prefix language interwiki links with w:
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Lua|Module:ISOdate}}
{{TemplateBox
{{TemplateBox
|1=1
|1=1
Line 20: Line 21:
|5=case
|5=case
|5alias= form
|5alias= form
|5d-en=allows to specify [[:en:Grammatical case|grammatical case]] for the month for languages that use them. Possible cases:
|5d-en=allows to specify [[:w:Grammatical case|grammatical case]] for the month for languages that use them. Possible cases:
* leave blank for default case, which is usually [[:en:Nominative case|nominative]] in most languages or [[:en:Genitive case|genitive case]], for a date given in isolation (out of a sentence).
* leave blank for default case, which is usually [[:w:Nominative case|nominative]] in most languages or [[:w:Genitive case|genitive case]], for a date given in isolation (out of a sentence).
* "case=nom" for the [[:en:Nominative case|nominative case]] (for many languages with distinctive grammatical cases, for languages without case distinctions, this is the only existing form)
* "case=nom" for the [[:w:Nominative case|nominative case]] (for many languages with distinctive grammatical cases, for languages without case distinctions, this is the only existing form)
* "case=gen" for the [[:en:Genitive case|genitive case]] (supported for languages with distinctive grammatical cases)
* "case=gen" for the [[:w:Genitive case|genitive case]] (supported for languages with distinctive grammatical cases)
* "case=loc" for the [[:en:Locative case|locative case]] (supported for languages: pl, cs, sl)
* "case=loc" for the [[:w:Locative case|locative case]] (supported for languages: pl, cs, sl)
* "case=ins" for the [[:en:Instrumental case|instrumental case]] (supported for languages: ru, pl, cs, sl)
* "case=ins" for the [[:w:Instrumental case|instrumental case]] (supported for languages: ru, pl, cs, sl)
* "case=ptv" for the [[:en:Partitive case|partitive case]] (supported for language: fi)
* "case=ptv" for the [[:w:Partitive case|partitive case]] (supported for language: fi)
* "case=ine" for the [[:en:Inessive case|inessive case]] (supported for language: fi)
* "case=ine" for the [[:w:Inessive case|inessive case]] (supported for language: fi)
* "case=ela" for the [[:en:Elative case|elative case]] (supported for language: fi)
* "case=ela" for the [[:w:Elative case|elative case]] (supported for language: fi)
* "case=ill" for the [[:en:Illative case|illative case]] (supported for language: fi)
* "case=ill" for the [[:w:Illative case|illative case]] (supported for language: fi)
|5label = case
|5label = case
|5d-td  = case
|5d-td  = case
Line 35: Line 36:


|6=class
|6=class
|6d-en=allows to set the html class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by [[w:HCalendar|hCalendar]]). See [[Commons:Microformats Project|the microformats project]]. "class=" will remove all metadata.  
|6d-en=allows to set the html class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by [[w:HCalendar|hCalendar]]). See [[Commons:Microformats Project|the microformats project]]. "class=-" or "class=" will remove all metadata.  
|6label = class
|6label = class
|6d-td  = class
|6d-td  = class
Line 53: Line 54:


|name=ISOdate
|name=ISOdate
|desc=For a [[:en:ISO 8601#Calendar dates|calendar date in ISO 8601]] ''extended format'' in the form YYYY-MM-DD (e.g. "{{#time: Y-m-d }}"), with or without time, this template extracts the year, month, day and time, and calls {{tl|date}} with the year, month and day found to display the date in localised format, with the time, if specified, appended. It provides the convenience of passing on a date (or even a date and a time) from one template to another as a single parameter, even though {{tl|date}} eventually needs the date components separately.
|desc=For a [[:w:ISO 8601#Calendar dates|calendar date in ISO 8601]] ''extended format'' in the form YYYY-MM-DD (e.g. "{{#time: Y-m-d }}"), with or without time, this template extracts the year, month, day and time, and calls {{tl|date}} with the year, month and day found to display the date in localised format, with the time, if specified, appended. It provides the convenience of passing on a date (or even a date and a time) from one template to another as a single parameter, even though {{tl|date}} eventually needs the date components separately.


This template overcomes some flaws of the automatic conversion by <nowiki>{{#time: }}</nowiki> for non-full dates (e.g. "77-09" for September 77 AD, which would throw an error with <nowiki>{{#time: }}</nowiki>).
This template overcomes some flaws of the automatic conversion by <nowiki>{{#time: }}</nowiki> for non-full dates (e.g. "77-09" for September 77 AD, which would throw an error with <nowiki>{{#time: }}</nowiki>).
Line 75: Line 76:
|-
|-
|
|
:<code><nowiki>{{ISOdate|2010-11-01}}</nowiki></code>: {{ISOdate|2010-11-01}}
:<code><nowiki>{{ISOdate|2010-08-18 18:15:30Z}}</nowiki></code>: {{ISOdate|2010-08-18 18:15:30Z}}
:<code><nowiki>{{ISOdate|2010-08-18 18:15:30Z}}</nowiki></code>: {{ISOdate|2010-08-18 18:15:30Z}}
:<code><nowiki>{{ISOdate|2010-08-18 08:15:30}}</nowiki></code>: {{ISOdate|2010-08-18 08:15:30}}
:<code><nowiki>{{ISOdate|2010-08-18 08:15:30}}</nowiki></code>: {{ISOdate|2010-08-18 08:15:30}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.