Last active
December 12, 2015 03:28
-
-
Save saturngod/4707094 to your computer and use it in GitHub Desktop.
mahabote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arr[0] ="အဓိပတိ"; | |
$arr[1] = "ဘင်္ဂ"; | |
$arr[2] = "မရဏ"; | |
$arr[3] = "အထွန်း"; | |
$arr[4] = "သိုက်"; | |
$arr[5] = "ရာဇ"; | |
$arr[6] = "ပုတိ"; | |
$n = 5; // modulo | |
$k = 3; // day , 3 is Tue | |
//$res = ((2*$n)+((8-(2*$k)) % 7)) % 7; | |
$res= ( 2* $n + 1 - 2 * k ) % 7 //Simplifying | |
if($res < 0) { | |
// -1 mod 7 should be 6 but php return -1 | |
$res = 7 + $res1; | |
} | |
echo $arr[$res]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment