1
0
Fork 0

Merge pull request #145 from MaBecker/app_locale

add function meridian to locale
master
Gordon Williams 2020-03-26 08:13:28 +00:00 committed by GitHub
commit 4b2be13dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
0.01: New App!
0.02: Fix locale.currencySym
0.03: Fix global 'locale' variable
0.04: Add function meridian

View File

@ -71,9 +71,10 @@ exports = {
distance: n => (n < 1000) ? Math.round(n) + locale.distance[0] : Math.round(n/1000) + locale.distance[1],
speed: s => Math.round(s) +locale.speed,
temp: t => Math.round(t) + locale.temperature,
translate: s => {s=""+s;return locale.trans[s]||locale.trans[s.toLowerCase()]||s},
translate: s => {s=""+s;return locale.trans[s]||locale.trans[s.toLowerCase()]||s;},
date: (d,short) => (short) ? \`${dateS}\`: \`${dateN}\`,
time: (d,short) => (short) ? \`${timeS}\`: \`${timeN}\`,
meridian: d => (d.getHours() <= 12) ? locale.ampm[0]:locale.ampm[1],
};`;
sendCustomizedApp({