Predložak:DatumFormat
Izgled
13. lipnja 2026.
Predložak služi za pretvorbu datuma u željeni format. Predložak prima dva neobavezna neimenovana parametra:
- datum koji želimo pretvoriti u drugi format (ako je prazan, uzima se današnji datum
- format u koji želimo pretvoriti datum (ako je prazan, uzima se zadani format ove Wikipedije: dan. mjesec u genitivu godina.
Primjeri
Ispravnog unosa
| Format | Unos | Izlaz |
|---|---|---|
| nije definiran | {{DatumFormat|2006-08-04}} |
4. kolovoza 2006. |
{{DatumFormat|Aug 4, 2006}} |
4. kolovoza 2006. | |
{{DatumFormat|4 August 2006}} |
4. kolovoza 2006. | |
{{DatumFormat|4 August}} |
4. kolovoza | |
{{DatumFormat|Aug 4}} |
4. kolovoza | |
{{DatumFormat|}} |
13. lipnja (nedostaje godina) | |
{{DatumFormat}} |
13. lipnja 2026. | |
{{DatumFormat|2=}} |
13. lipnja 2026. | |
| DMY format | {{DatumFormat|2006-08-04|DMY}} |
4. kolovoza 2006. |
{{DatumFormat|Aug 4, 2006|DMY}} |
4. kolovoza 2006. | |
{{DatumFormat|4 August 2006|DMY}} |
4. kolovoza 2006. | |
{{DatumFormat|4 August|DMY}} |
4. kolovoza | |
{{DatumFormat|Aug 4|DMY}} |
4. kolovoza | |
{{DatumFormat||DMY}} |
13. lipnja (nedostaje godina) | |
{{DatumFormat|2=DMY}} |
13. lipnja 2026. | |
{{DatumFormat|{{DatumFormat}}|DMY}} |
13. lipnja 2026. | |
| MDY format | {{DatumFormat|2006-08-04|MDY}} |
kolovoz 4, 2006 |
{{DatumFormat|Aug 4, 2006|MDY}} |
kolovoz 4, 2006 | |
{{DatumFormat|4 August 2006|MDY}} |
kolovoz 4, 2006 | |
{{DatumFormat|4 August|MDY}} |
kolovoz 4 | |
{{DatumFormat|Aug 4|MDY}} |
kolovoz 4 | |
{{DatumFormat||MDY}} |
lipanj 13 (nedostaje godina) | |
{{DatumFormat|2=MDY}} |
lipanj 13, 2026 | |
{{DatumFormat|{{DatumFormat}}|MDY}} |
13. lipnja 2026. | |
| YMD format | {{DatumFormat|2006-08-04|YMD}} |
2006 kolovoz 4 |
{{DatumFormat|Aug 4, 2006|YMD}} |
2006 kolovoz 4 | |
{{DatumFormat|4 August 2006|YMD}} |
2006 kolovoz 4 | |
{{DatumFormat|4 August|YMD}} |
kolovoz 4 | |
{{DatumFormat|Aug 4|YMD}} |
kolovoz 4 | |
{{DatumFormat||YMD}} |
lipanj 13 (nedostaje godina) | |
{{DatumFormat|2=YMD}} |
2026 lipanj 13 | |
{{DatumFormat|{{DatumFormat}}|YMD}} |
13. lipnja 2026. | |
| ISO format | {{DatumFormat|2006-08-04|ISO}} |
2006-08-04 |
{{DatumFormat|Aug 4, 2006|ISO}} |
2006-08-04 | |
{{DatumFormat|4 August 2006|ISO}} |
2006-08-04 | |
{{DatumFormat|4 August|ISO}} |
--08-04 | |
{{DatumFormat|Aug 4|ISO}} |
--08-04 | |
{{DatumFormat|{{#time: --m-d}}|ISO}} |
--06-13 (nedostaje godina) | |
{{DatumFormat|2=ISO}} |
2026-06-13 | |
{{DatumFormat|{{DatumFormat}}|ISO}} |
13. lipnja 2026. | |
| none format | {{DatumFormat|2006-08-04|none}} |
2006-08-04 |
{{DatumFormat|Aug 4, 2006|none}} |
Aug 4, 2006 | |
{{DatumFormat|4 August 2006|none}} |
4 August 2006 | |
{{DatumFormat|4 August|none}} |
4 August | |
{{DatumFormat|Aug 4|none}} |
Aug 4 | |
{{DatumFormat||none}} |
(blank) | |
{{DatumFormat|2=none}} |
(blank) | |
{{DatumFormat|{{DatumFormat}}|none}} |
13. lipnja 2026. |
Drugi prihvatljivi unosi
Drugi unosi za koje predložak daje točan rezultat:
| Unos | Izlaz |
|---|---|
{{DatumFormat|1st December 2008}} (ordinal 'st') |
1. prosinca 2008. |
{{DatumFormat|June 24 2006}} (bez zareza) |
24. lipnja 2006. |
{{DatumFormat|24 june 2006}} (ime mjeseca malim slovom) |
24. lipnja 2006. |
{{DatumFormat|24 jun}} (skraćeno ime mjeseca) |
24. lipnja |
{{DatumFormat|June 2006}} |
lipanj 2006. |
{{DatumFormat|2006 June}} |
1. lipnja 2006. |
{{DatumFormat|05/31/2012}} |
31. svibnja 2012. |
{{DatumFormat|31-05-2012}} |
31. svibnja 2012. |
Neispravni unosi
Unosi koje predložak ne može obraditi vraćaju se nepromijenjeni. To uključuje i uglate zagrade u unosu.
| Unos | Izlaz |
|---|---|
{{DatumFormat|23007-031-24}} |
23007-031-24 |
{{DatumFormat|[[1 December]] [[2008]]|YMD}} |
1 December 2008 |
{{DatumFormat|1 December [[2008 in film|2008]]|MDY}} |
1 December 2008 |
{{DatumFormat|2008 December 1|DMY}} |
2008 December 1 (očekivano: 1. prosinca 2008.) |
{{DatumFormat|2008 December 1|MDY}} |
2008 December 1 (očekivano: prosinac 1, 2008) |
{{DatumFormat|2008 December 1|ISO}} |
2008 December 1 (očekivano: 2008-12-01) |
{{DatumFormat|June 2006|ISO}} |
lipanj 2006. (nedostaje dan, očekivano: 2006-06--) |
{{DatumFormat|--08-24}} |
--08-24 |
{{DatumFormat|-08-24}} |
13. lipnja 2026. |
{{DatumFormat|08-24}} |
08-24 |
{{DatumFormat|2006-08--}} |
2006-08-- |
{{DatumFormat|2006-08-}} |
2006-08- |
{{DatumFormat|32 Aug}} |
32 Aug |
{{DatumFormat|932 Aug}} |
932 Aug |
{{DatumFormat|0932 Aug}} |
0932 Aug |
{{DatumFormat|Aug 32}} |
Aug 32 |
{{DatumFormat|Aug 932}} |
Aug 932 |
{{DatumFormat|Aug 0932}} |
Aug 0932 |
{{DatumFormat|31/05/2012}} |
31/05/2012 (očekivano 31. svibnja 2012.) |
{{DatumFormat|05-31-2012}} |
05-31-2012 (očekivano 31. svibnja 2012.) |