Skip to content

Parser to convert from .NET ticks #1700

@supersime

Description

@supersime

I am reading dates from a 'Microsoft'-based system that is storing dates as a .NET Tick. When I use these dates I need to convert them for use in JavaScript.

I'd like to see a parser method such as DateTime.fromTicks(ticks) to help convert this into a DateTime object.

I can use this instead, but it's a bit of a "magic number" and would be much easier to use if it was just built into Luxon:

DateTime.fromMillis((ticks - 621_355_968_000_000_000) / 10_000);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions