mirror of https://github.com/espruino/BangleApps
16 lines
563 B
JavaScript
16 lines
563 B
JavaScript
var DateFormatter = require("slidingtext.dtfmt.js");
|
|
const hoursToText = require("slidingtext.utils.en.js").hoursToText;
|
|
const numberToText = require("slidingtext.utils.en.js").numberToText;
|
|
|
|
class EnglishDateFormatter extends DateFormatter {
|
|
constructor() { super();}
|
|
name(){return "English";}
|
|
shortName(){return "en"}
|
|
formatDate(date){
|
|
var hours_txt = hoursToText(date.getHours());
|
|
var mins_txt = numberToText(date.getMinutes());
|
|
return [hours_txt,mins_txt[0],mins_txt[1]];
|
|
}
|
|
}
|
|
|
|
module.exports = EnglishDateFormatter; |