Skip to content

Commit

Permalink
Merge pull request #574 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain committed May 11, 2024
2 parents 406348a + 0ae1fc7 commit 4d599e9
Show file tree
Hide file tree
Showing 12 changed files with 326 additions and 233 deletions.
2 changes: 1 addition & 1 deletion builds/wtf_wikipedia-client.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/wtf_wikipedia-client.mjs

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions builds/wtf_wikipedia.cjs
Expand Up @@ -4472,7 +4472,7 @@

sfn: ['sfnref', 'harvid', 'harvnb'],

'birth date and age': ['death date and age', 'bda'],
'birth date and age': ['death date and age', 'bda', 'b-da'],

currentmonth: ['localmonth', 'currentmonthname', 'currentmonthabbrev'],

Expand Down Expand Up @@ -4562,6 +4562,7 @@
'start date',
'end date',
'birth date',
'birthdate',
'death date',
'start date and age',
'end date and age',
Expand Down Expand Up @@ -6609,7 +6610,7 @@
['🇿🇼 ', 'zwe', 'zimbabwe'],
//others (later unicode versions)
['🇺🇳', 'un', 'united nations'],
['🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿', 'eng', 'england'],
['🏴󠁧󠁢󠁥󠁮󠁧󠁿', 'eng', 'england'],
['🏴󠁧󠁢󠁳󠁣󠁴󠁿', 'sct', 'scotland'],
['🏴󠁧󠁢󠁷󠁬󠁳󠁿', 'wal', 'wales'],
['🇪🇺', 'eu', 'european union'],
Expand Down Expand Up @@ -8224,7 +8225,7 @@
return months[d.getMonth()] + ' ' + d.getFullYear()
},

'year': (tmpl) => {
year: (tmpl) => {
let date = parser(tmpl, ['date']).date;
let d = new Date(date);
if (date && isNaN(d.getTime()) === false) {
Expand All @@ -8237,6 +8238,12 @@
let time = parser(tmpl, ['date', 'fmt']).date;
return timeSince(time)
},
'birth date': (tmpl, list) => {
let obj = parser(tmpl, ['year', 'month', 'date']);
list.push(obj);
obj = ymd([obj.year, obj.month, obj.day]);
return toText(obj)
},
//https://en.wikipedia.org/wiki/Template:Birth_date_and_age
'birth date and age': (tmpl, list) => {
let obj = parser(tmpl, ['year', 'month', 'day']);
Expand Down Expand Up @@ -10963,7 +10970,7 @@
})
};

var version = '10.3.0';
var version = '10.3.1';

/**
* use the native client-side fetch function
Expand Down
15 changes: 11 additions & 4 deletions builds/wtf_wikipedia.mjs
Expand Up @@ -4468,7 +4468,7 @@ let multi = {

sfn: ['sfnref', 'harvid', 'harvnb'],

'birth date and age': ['death date and age', 'bda'],
'birth date and age': ['death date and age', 'bda', 'b-da'],

currentmonth: ['localmonth', 'currentmonthname', 'currentmonthabbrev'],

Expand Down Expand Up @@ -4558,6 +4558,7 @@ let multi = {
'start date',
'end date',
'birth date',
'birthdate',
'death date',
'start date and age',
'end date and age',
Expand Down Expand Up @@ -6605,7 +6606,7 @@ var flags = [
['🇿🇼 ', 'zwe', 'zimbabwe'],
//others (later unicode versions)
['🇺🇳', 'un', 'united nations'],
['🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿', 'eng', 'england'],
['🏴󠁧󠁢󠁥󠁮󠁧󠁿', 'eng', 'england'],
['🏴󠁧󠁢󠁳󠁣󠁴󠁿', 'sct', 'scotland'],
['🏴󠁧󠁢󠁷󠁬󠁳󠁿', 'wal', 'wales'],
['🇪🇺', 'eu', 'european union'],
Expand Down Expand Up @@ -8220,7 +8221,7 @@ var dates = {
return months[d.getMonth()] + ' ' + d.getFullYear()
},

'year': (tmpl) => {
year: (tmpl) => {
let date = parser(tmpl, ['date']).date;
let d = new Date(date);
if (date && isNaN(d.getTime()) === false) {
Expand All @@ -8233,6 +8234,12 @@ var dates = {
let time = parser(tmpl, ['date', 'fmt']).date;
return timeSince(time)
},
'birth date': (tmpl, list) => {
let obj = parser(tmpl, ['year', 'month', 'date']);
list.push(obj);
obj = ymd([obj.year, obj.month, obj.day]);
return toText(obj)
},
//https://en.wikipedia.org/wiki/Template:Birth_date_and_age
'birth date and age': (tmpl, list) => {
let obj = parser(tmpl, ['year', 'month', 'day']);
Expand Down Expand Up @@ -10959,7 +10966,7 @@ const fetch = function (title, options, callback) {
})
};

var version = '10.3.0';
var version = '10.3.1';

/**
* use the native client-side fetch function
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Expand Up @@ -3,6 +3,13 @@
-->

#### 10.3.1 [May 2024]

- **[fix]** - unicode glitch token #573
- **[fix]** - retire mixesdb wiki test
- **[fix]** - support birthdate template aliases #537
- **[update]** - dependencies

#### 10.3.0 [Dec 2023]

- **[new]** - fallbackTemplateFn handler #509
Expand Down

0 comments on commit 4d599e9

Please sign in to comment.