38 lines
701 B
TypeScript
38 lines
701 B
TypeScript
![]() |
import { leadingZeros } from "../../text/leadingZeros";
|
||
|
|
||
|
export class EN_Locale
|
||
|
{
|
||
|
Date =
|
||
|
{
|
||
|
Calender:( date:Date ) =>
|
||
|
{
|
||
|
let month = date.getMonth();
|
||
|
let day = date.getDate();
|
||
|
let year = date.getFullYear();
|
||
|
|
||
|
return `${month}/${day}/${year}`
|
||
|
},
|
||
|
|
||
|
Time:( hours24:number, minutes:number ) =>
|
||
|
{
|
||
|
let hours12 = hours24 % 12;
|
||
|
let period = hours24 < 12 ? "a" : "p";
|
||
|
|
||
|
if ( hours12 === 0 )
|
||
|
{
|
||
|
hours12 = 12;
|
||
|
}
|
||
|
|
||
|
return `${leadingZeros( hours12 )}:${leadingZeros( minutes)} ${period}m`
|
||
|
},
|
||
|
}
|
||
|
|
||
|
Dialog =
|
||
|
{
|
||
|
Dialog: "Dialog",
|
||
|
Confirm: "OK",
|
||
|
Cancel: "Cancel",
|
||
|
Path:"Path",
|
||
|
Name:"Name"
|
||
|
}
|
||
|
}
|