Commit bfa03f1dcf84e73ae7a42659a5ea82b94eb928ee
1 parent
7cf817c75d
Exists in
develop
Add
Linea al final de archivo
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/app/utils/dateExtension.ts
1 | export class DateExtension { | 1 | export class DateExtension { |
2 | 2 | ||
3 | public static ValidateDateRange(dateStart: string, dateEnd: string) { | 3 | public static ValidateDateRange(dateStart: string, dateEnd: string) { |
4 | if (dateEnd === null) return false; | 4 | if (dateEnd === null) return false; |
5 | const today = new Date(Date.now()); | 5 | const today = new Date(Date.now()); |
6 | return (new Date(dateStart) <= today && today <= new Date(dateEnd)) | 6 | return (new Date(dateStart) <= today && today <= new Date(dateEnd)) |
7 | ? true : false; | 7 | ? true : false; |
8 | } | 8 | } |
9 | 9 | ||
10 | } | ||
10 | } |