Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. So the Mayans didn't enable Javascript?

So the Mayans didn't enable Javascript?

Scheduled Pinned Locked Moved The Lounge
javascriptquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Dubyo
    wrote on last edited by
    #1

    The world will actually end at 1am on Saturday the 13th of September in the year 275760, according to the Javascript documentation.. http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.1[^] Quick test...

    var endOfTheWorld = new Date();
    endOfTheWorld.setTime(8640000000000000);
    document.write(endOfTheWorld);

    "Sat Sep 13 275760 01:00:00 GMT+0100 (GMT Daylight Time)" :-D

    B 1 Reply Last reply
    0
    • S Steve Dubyo

      The world will actually end at 1am on Saturday the 13th of September in the year 275760, according to the Javascript documentation.. http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.1[^] Quick test...

      var endOfTheWorld = new Date();
      endOfTheWorld.setTime(8640000000000000);
      document.write(endOfTheWorld);

      "Sat Sep 13 275760 01:00:00 GMT+0100 (GMT Daylight Time)" :-D

      B Offline
      B Offline
      Brady Kelly
      wrote on last edited by
      #2

      But nothing in that code is determining the end; you are setting that value.

      S 1 Reply Last reply
      0
      • B Brady Kelly

        But nothing in that code is determining the end; you are setting that value.

        S Offline
        S Offline
        Steve Dubyo
        wrote on last edited by
        #3

        Indeed, I'm setting the maximum valid value as specified in the documentation to determine the actual date/time. If you add 1 to that number it returns an Invalid Date exception. I didn't need to loop/test because for once I had actually read the manual! :-D

        ;-]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups