Skip to content

endOf("week") incorrectly evaluates to be the end of Monday #443

Description

@william-tsai

zen-engine version = 0.53.0

I'm using version 0.53.0.

When using the new d() syntax to get the end of the current week, d("America/Los_Angeles").endOf("week") would incorrectly evaluate to be the following Monday.

However, using the old date() syntax, endOf(date("now"), "week") would correctly evaluate to be this upcoming Sunday.

Even using the d("2024-01-15").endOf("week") example shown in the "Date operations" documentation, it'd incorrectly evaluate to be 2024-01-16T23:59:59Z (a Tuesday??) instead of 2024-01-21T23:59:59 (Sunday) that is shown in the documentation (see second screenshot below).

Please advise. Thank you!

Image ------------------------------------------------------------------ Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions