Sexagesimal (base 60) is a numeral system with sixty as its base. In some form with help of decimal digits is used for measuring time, angles, and geographic coordinates. There are no special symbols for it’s digits like in binary system (0,1) or decimal system (0,1,2,3,4,5,6,7,8,9). For certain application, there could be an option to use existing characters from ASCII table and assign them value of sexagesimal digits [0-9A-Za-x]. Value of such digit is monotonically growing, so it possible to use it for ordering and sorting.
Transformation table could look like this:
0: 0123456789 1: ABCDEFGHIJ 2: KLMNOPQRST 3: UVWXYZabcd 4: efghijklmn 5: opqrstuvwx
Here are an example transformations from decimal system into such sexagesimal system with it’s digits defined above:
00:00 -> 00, 01:01 -> 11, 05:10 -> 5A, 10:10 -> AA, 12:10 -> CA, 12:30 -> CU, 12:59 -> Cx, 12:33 -> CX, 23:50 -> No, 10:36 -> Aa, 11:59:59 -> Bxx, 18:30:00 -> IU0.
public static char sexagesimal_char(int n60) {
if (n60 < 10) return (char) (48 + n60);//or (‘0’ + n60)
if (n60 < 36) return (char) (55 + n60);//65-10 or (‘A’ + n60 – 10)
return (char) (61 + n60); //97-36 or (‘a’ + n60 – 36)
}