Skip to content

Instantly share code, notes, and snippets.

@acro5piano
Last active November 7, 2024 11:00
Show Gist options
  • Save acro5piano/e75152db4c5e22483d45a13d5158a94b to your computer and use it in GitHub Desktop.
Save acro5piano/e75152db4c5e22483d45a13d5158a94b to your computer and use it in GitHub Desktop.
Luxon test
import { DateTime } from 'luxon'
const a = DateTime.now().setZone('Asia/Tokyo')
const b = DateTime.fromISO('2024-11-07').setZone('Asia/Tokyo').endOf('day')
const c = DateTime.now()
console.log({ a, b, c })
console.log(a < b)
console.log(b < c)
console.log(a.toISODate())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment