Skip to content

Commit

Permalink
Added LocalDateTime.browser(), the current time expressed in the brow…
Browse files Browse the repository at this point in the history
…ser's time zone
  • Loading branch information
DavidDuwaer committed May 26, 2021
1 parent 0a979d5 commit 3a36616
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/LocalDateTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export class LocalDateTime
return new LocalDateTime(date, time);
}

public static browser()
{
return Instant.now()
.atZone(ZoneId.browser());
}

public atZone(zoneIdString: ZoneIdString)
public atZone(zoneId: ZoneId)
public atZone(arg: ZoneId | ZoneIdString)
Expand Down

0 comments on commit 3a36616

Please sign in to comment.