Luxon JS useful functions

Date time to unix timestamp:

DateTime.fromISO( date ).toUnixInteger()

Convert to different timezone

DateTime.fromISO( date, {
			zone: timezone,
		} ).toString()

Get users current timezone

DateTime.local().zoneName

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *