Skip to content

Date pipe not work well in costum format without day #17200

@BtShp

Description

@BtShp

I'm submitting a ... (check one with "x")

[ X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
in date pipe, format of "MM/y" or "MM/yyyy" ,
part of the dates with month 10- display like 9:
Ex:

Expected behavior
get the right date...

Minimal reproduction of the problem with instructions

in date 01/10/2012, instead of getting 10/2012 ,Im getting 09/2012. instead of 10/2007, Im getting 09/2007.
in date 10/14 for example it display well...

What is the motivation / use case for changing the behavior?
Im using this format alot..

Please tell us about your environment:
HTTP server,

  • Angular version: 2.0.X
    2.4.4

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    Chrome 58.0.3029.110

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    TypeScript 2.0.3

  • Node (for AoT issues): node --version =

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions