You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/pipes/UserLocalePipe.ts

13 lines
363 B

import { Pipe, PipeTransform } from "@angular/core";
import * as moment from "moment";
const momentConstructor = moment;
@Pipe({ name: "amUserLocale" })
export class UserLocalePipe implements PipeTransform {
transform(value: moment.MomentInput): moment.Moment {
const locale = navigator.language;
return momentConstructor(value).locale(locale);
}
}