Skip to content

Incorrect calculation of weekofyear? #2768

@dhirschfeld

Description

@dhirschfeld

The calculation of the week/weekofyear attribute of a Timestamp/DatetimeIndex differs from both python and mx.DateTime which both return week = 1 for 31-Dec-2013.

In [25]: import mx.DateTime
    ...: from datetime import datetime
    ...: d = datetime(2013,12,31)
    ...: 

In [26]: d.isocalendar()
Out[26]: (2014, 1, 2)

In [27]: mx.DateTime.DateTimeFrom(d).iso_week
Out[27]: (2014, 1, 2)

In [28]: pd.Timestamp(d).week
Out[28]: 53

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions