Skip to content

System.DateTimeOffset Property - StartTimeOfDay #30989

@Connect-a

Description

@Connect-a

I would like to propose a new StartTimeOfDay property that contribute for readability.

e.g.

private static void Main()
{
    var now = DateTimeOffset.Now;
    var midnight = now - now.TimeOfDay;
}

to

private static void Main()
{
    var midnight = DateTimeOffset.Now.StartTimeOfDay;
}

I don't want to make extention methods in 'DateUtil' class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions