Predloga:Ayd
Predloga se uporablja na številnih straneh, zato bo vsaka njena sprememba takoj zelo opazna. Prosimo, da vse spremembe, ki jih želite uvesti, pred uvedbo preizkusite na podstraneh predloge (/peskovnik in /testniprimeri) ali na svojih lastnih podstraneh. Pred spreminjanjem te predloge se o želenih spremembah rajši pogovorite na pogovorni strani. |
Uporablja Lua: |
This template returns the number of full years and surplus days between two specified dates. If only one date is entered, the template returns the number of full years and surplus days between the specified date and today's date.
A hidden sort key is included so values produced by this template will work properly in sortable tables. The sort key is calculated from the number of days between the given dates, and is compatible with {{number table sorting}}.
This is temporary documentation resulting from Template talk:Age in years and days#Google problems which shows problems when {{age in years and days}} outputs a hidden sort key. It is proposed that {{age in years and days}} will not output a hidden sort key, so {{age in years and days nts}} is needed for when a sort key is wanted.
Usage
[uredi kodo]For convenience, the redirect {{ayd}} can be used. Each date can be entered in a single parameter, or each date can be entered as three parameters (year, month, day).
{{ayd|15 May 2010}}
→ 14 years, 228 days{{ayd|12 Aug 2003|24 Sep 2011}}
→ 8 years, 43 days{{ayd|19 Jan 1689}}
→ 335 years, 345 days{{ayd|1989|7|23}}
→ 35 years, 159 days{{ayd|1989|7|23|2003|7|24}}
→ 14 years, 1 day{{ayd|2007|03|02|2008|03|02}}
→ 1 year, 0 days{{ayd|1999|11|07|2112|02|15}}
→ 112 years, 100 days
An error is shown if an entered date is not valid (1900 was not a leap year).
{{ayd|31 January 1892|29 February 1900}}
→ Error: Second date should be year, month, day
- Rojstvo, smrt, starost
- {{BirthDeathAge}} – kombinacija funkcij {{Birth-date}}, {{Datum rojstva}}, {{Datum rojstva in starost}}, {{Leto rojstva in starost}}, {{Death-date}}, {{Datum smrti}}, {{Datum smrti in starost}}, {{Leto smrti in starost}}
- {{Datum rojstva}} – izpiše datum in povezane skrite meta podatke
- {{Datum rojstva in starost}} – enako kot {{Datum rojstva}}, razen da se izza datuma rojstva izpiše tudi "(## let)"
- {{Datum rojstva in starost2}} – izpiše starost za določeni datum in datum rojstva, "## let (datum rojstva)"
- {{Birth-date and age}} – display birth date and age, accepts dates as text (15 June 1950; June 15, 1950; June 1950; etc.)
- {{Leto rojstva in starost}} – leto rojstva in približna starost
- {{Birth based on age as of date}} – displays approximate birth year and current age; used when a dated reference mentions the age of a person as of the date of publication
- {{Birth date based on age at death}} – displays approximate birth year based on age at death (useful if exact birth date is not known, but age at death is)
- {{Datum smrti}} – izpiše datum in povezane skrite meta podatke
- {{Datum smrti in starost}} – enako kot {{Datum smrti}}, razen da se izza datuma smrti izpiše tudi "(## let)"
- {{Death-date and age}} – display death date and age, accepts date as text (15 June 1950; June 15, 1950; June 1950; etc.)
- {{Death date and given age}} – displays death date and specified age (useful if exact birth date is not known, but age at death is)
- {{Leto smrti in starost}} – leto smrti in približna starost ob smrti
- Samo starost
- {{Starost}} – starost, ki temelji na celih letih med dvema datumoma (ali med določenim in današnjim datumom)
- {{Starost nts}} – kot {{Starost}}, vendar pravilno razvrsti v razvrstljivih tabelah
- {{Age as of date}} – current age in years, based on a known age as of a specified date
- {{Starost v letih in dnevih}} – cela leta in dnevi med dvema datumoma (določen in trenutni datum)
- {{Starost v letih in dnevih kot besedilo}} – za uporabo v besedilu (uporablja "in" namesto vejice)
- {{Starost v letih, mesecih in dnevih}} – celotna leta, meseci in dnevi med dvema datumoma (ali določenim datumom in trenutnim datumom)
- {{Starost v dnevih}} – starost v dnevih med dvema datumoma (ali določenim in trenutnim datumom)
- {{Starost v dnevih nts}} – starost v dnevih; števila se bodo v tabelah pravilno sortirala