Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Just a few moments ago, my mind started wandering onto the subject of the most efficient way to store a calendar date in terms of number of bytes used.

Just a few moments ago, my mind started wandering onto the subject of the most efficient way to store a calendar date in terms of number of bytes used.

Scheduled Pinned Locked Moved Uncategorized
1 Posts 1 Posters 0 Views
  • 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.
  • J This user is from outside of this forum
    J This user is from outside of this forum
    jaybird110127@dragonscave.space
    wrote last edited by
    #1

    Just a few moments ago, my mind started wandering onto the subject of the most efficient way to store a calendar date in terms of number of bytes used. And as sometimes happens during such random wanderings, I hit upon a scheme for storing a month, date, and year within an arbitrarily-defined 100-year period in two bytes. The month (1 through 12) takes four bits, the date (1 through 31) takes five bits, and the remaining seven bits are used for the year (0 through 99). Additionally, this scheme allows for calendar modification or possibly some alternate calendars, to a certain extent. There can actually be up to sixteen months (0 through 15), any of which can have up to thirty-two days (0 through 31), and the year can actually go from 0 up to 127. Is this useful? Probably not. So be it.

    1 Reply Last reply
    1
    0
    • pixelate@tweesecake.socialP pixelate@tweesecake.social shared this topic
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

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