mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-19 00:32:31 +00:00
Add date parsing and redirect logic for date sub-path in url
This commit is contained in:
@@ -21,6 +21,10 @@ export class Utils {
|
||||
return moment.tz(moment.tz.guess()).tz("Asia/Kolkata");
|
||||
}
|
||||
|
||||
static createSomeDateInIndiaTZ(dateString: string): moment.Moment {
|
||||
return moment.tz(dateString, moment.tz.guess()).tz("Asia/Kolkata");
|
||||
}
|
||||
|
||||
static checkSameDayInSameTZ(moment1: moment.Moment, moment2: moment.Moment, raiseErrorTZMismatch: boolean = true) {
|
||||
// tslint:disable-next-line:triple-equals
|
||||
if (raiseErrorTZMismatch && (moment1.tz() != moment2.tz())) {
|
||||
|
||||
Reference in New Issue
Block a user