Skip to content

problem in built-ins/Temporal/PlainDate/prototype/since/largestunit-higher-units.js #3249

@FrankYFTang

Description

@FrankYFTang

https://github.com/tc39/test262/blob/main/test/built-ins/Temporal/PlainDate/prototype/since/largestunit-higher-units.js

I have hard time to understand about the current expectaiton

const lastFeb20 = Temporal.PlainDate.from("2020-02-29");
const lastFeb21 = Temporal.PlainDate.from("2021-02-28");

lastFeb21.since(lastFeb20, { largestUnit: "years" }) => my implementation give me "P1Y"
lastFeb21.since(lastFeb20, { largestUnit: "months" }) => my implementation give me "P12M"

Could you explain to me why the exepectation are 11 months and 28 days here for these?

The current spec text is so complicate it is very difficult to tell how it work.

@ptomato @Ms2ger

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