Everything is a number underneathbeginner
A date, a price, a flag — each is stored as numbers, and integer division and remainder are how you take a number apart; money needs decimal because binary floating point cannot hold 0.10 exactly.
A date is stored as 20160229. Take it apart into a year, a month and a day, and put it back together, using arithmetic only.
All four methods use integer arithmetic only, and Encode reverses the other three.
Published in full, before you start — every point is one of these and there is nothing else.
A date, a price, a flag — each is stored as numbers, and integer division and remainder are how you take a number apart; money needs decimal because binary floating point cannot hold 0.10 exactly.