Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

datetime.strftime("%Y") is not padding correctly #120713

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@martinvuyk

Description

@martinvuyk

Bug report

Bug description:

docs say:

%YYear with century as a decimal number.0001, 0002, …, 2013, 2014, …, 9998, 9999

but this is what is happening

fromdatetimeimportdatetimeprint(datetime(9,6,7).strftime("%Y-%m-%d"))# 9-06-07print(datetime(99,6,7).strftime("%Y-%m-%d"))# 99-06-07print(datetime(999,6,7).strftime("%Y-%m-%d"))# 999-06-07

CPython versions tested on:

3.10

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp