Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

GetISOWeek return a wrong value #118

Open
tossnet opened this issue Apr 12, 2018 · 0 comments
Open

GetISOWeek return a wrong value #118

tossnet opened this issue Apr 12, 2018 · 0 comments

Comments

@tossnet
Copy link

tossnet commented Apr 12, 2018

Hi,
I have a problem with that. Maybe it's my code :
The good number week for the 2018-04-15 is 15, not 20
`

  <script type='text/javascript' src='js/globalization/date-en-US.js'></script>
  <script type='text/javascript' src='js/core.js'></script>
  <script type='text/javascript' src='js/sugarpak.js'></script>
  <script type='text/javascript' src='js/parser.js'></script>

  <script language="javascript">
      var d = Date.today().set({ year: 2018, month: 4, day: 15 });
      console.log("week ISO number:" + d.getISOWeek());
      console.log("week number:" + Date.parse('2018-04-15').getWeek());
      // return 
      //week ISO number: 20
      //week  number: 15
  </script>
</HEAD>
`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant