Skip to content

Commit

Permalink
add SecondMs and improve typing for validDateTime()
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Sep 30, 2023
1 parent bb10b8c commit f2a6d7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DateTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { ExifDateTime } from "./ExifDateTime"
import { ExifTime } from "./ExifTime"
import { Maybe } from "./Maybe"

export function validDateTime(dt: DateTime): boolean {
export function validDateTime(dt: Maybe<DateTime>): dt is DateTime {
return dt != null && dt.isValid
}

export const MinuteMs = 60 * 1000
export const SecondMs = 1000
export const MinuteMs = 60 * SecondMs
export const HourMs = 60 * MinuteMs
export const DayMs = 24 * HourMs

Expand Down

0 comments on commit f2a6d7e

Please sign in to comment.