8000 Week parsing (%W, %w) does not work · Issue #136 · google/cctz · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Week parsing (%W, %w) does not work #136
Closed
@tudor

Description

@tudor

Parsing 2020-05-1 using the %Y-%W-%w (year, week number, day in week) doesn't work; it returns the date 2020/01/01 instead of 2020/02/03` (Y/M/D).

This is because cctz doesn't handle %W and %w internally, but passes them to strptime one at a time, however strptime does nothing if it only sees %W, it needs both %W and %w in order to return something. (And presumably %Y as well in order to know whether the current year is a leap year or not.)

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

      0