Jump to content

Module:ISOdate/doc: Difference between revisions

From p1gwars
Created page with "{{Module rating|release}}{{Module rating|protected}} This module is intended for processing of date strings. Currently used by: *{{tl|ISOdate}} *{{tl|ISOyear}} It relies on Module:DateI18n ==ISOdate== This function is the engine behind {{tl|ISOdate}}. Please see that template for full documentation Usage: :should not be used directly but only through {{tl|ISOdate}} template Parameters: ; <code>|date=''date''</code> or <code>|1=''date''</code> : a valid date in "Y..."
 
Replaced content with "-"
Tag: Replaced
 
Line 1: Line 1:
{{Module rating|release}}{{Module rating|protected}}
-
This module is intended for processing of date strings. Currently used by:
*{{tl|ISOdate}}
*{{tl|ISOyear}}
 
It relies on [[Module:DateI18n]]
 
==ISOdate==
This function is the engine behind {{tl|ISOdate}}. Please see that template for full documentation
 
Usage:
:should not be used directly but only through {{tl|ISOdate}} template
 
Parameters:
; <code>|date=''date''</code> or <code>|1=''date''</code>
: a valid date in "YYYY-MM-DD HH:MM:SS" format; this date can be abbreviated with less fields (e.g. only the year), and leading zeroes in each numeric field may be dropped; this date may be optionally followed by a required space and any trailing text (which should be between parentheses) parsed and left as is in the ouput; if the specified date is not in a valid format, the value of this parameter will be returned as is.
; <code>|class=''class''</code>
: optional parameter for embedding the output within an invisible HTML <code>&lt;span class="''class''" lang="''lang''" dir="''ltr or rtl''"&gt;...&lt;/span&gt;</code> element with this class, also tagging the specified language and its direction (by default, use <code>|class=dtime</code>, as defined in microformats); set it to an empty value to remove this invisible HTML tag; this microtag is also not emitted if the given ''date'' cannot be parsed with one of the supported formats and its value will be returned as is.
; <code>|lang=''lang''</code>
: optional BCP 47 code of a language (not an interwiki code) used to translate the generated visible date (also used to properly tag the generated microformat, if it is generated, in the standard <code>lang="''lang''"</code> attribute of HTML)
; <code>|case=''case''</code>
: optional parameter for handling grammatical cases (such as genitive) in the translated date; only valid with some specific languages.
; <code>|trim_year=''flag''</code>
: optional parameter which allows (when it is set to a nn-empty value) to not display additional leading zeroes for years; by default or when this parameter is empty, years are rendered with at least 4 digits, padding them with zeroes as necessary.
 
==ISOyear==
This function is the engine behind {{tl|ISOyear}}. Please see that template for full documentation
 
Usage:
:should not be used directly but only through {{tl|ISOyear}} template
 
Parameters:
;1
:''date'' or ''1'' parameter
 
==See Also==
{{collapse|title=Modules related to internationalization (i18n) of dates|1={{DateRelatedModules}}}}

Latest revision as of 21:08, 11 January 2026

-