mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
feat(lang): more localization(#2219)
* feat(lang): localize some views * fix: typo * fix: Localization broke bug report generation * feat(lang): localize recipe page instructions
This commit is contained in:
parent
6b63c751b1
commit
9fd1ba6e46
29 changed files with 362 additions and 226 deletions
|
@ -99,11 +99,16 @@ function pad(num: number, size: number) {
|
|||
return numStr;
|
||||
}
|
||||
|
||||
export function timeUTCToLocal(time: string): string {
|
||||
export function timeUTC(time: string): Date {
|
||||
const [hours, minutes] = time.split(":");
|
||||
const dt = new Date();
|
||||
dt.setUTCMinutes(Number(minutes));
|
||||
dt.setUTCHours(Number(hours));
|
||||
return dt;
|
||||
}
|
||||
|
||||
export function timeUTCToLocal(time: string): string {
|
||||
const dt = timeUTC(time);
|
||||
return `${pad(dt.getHours(), 2)}:${pad(dt.getMinutes(), 2)}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue