April New Year

In order to explain why the New Year date is in April, we need to understand the solar calendar that was used in that period. A year is divided into 12 Reaseys. Reaseys are the divisions of the path of the Earth around the sun. These Reaseys are Makara Reasey, Khumpheak Reasey, and end with Tnou Reasey. See appendix for a complete list of Reaseys.

These Reaseys correspond to star constellations. Within the twelve Reaseys there is a star called Songkran or Chaitra. This star is selected as a dividing point to end the current year and start a new year. The star divides the Mena and Mesa Reasey. [KHM97] The Earth aligns with the star and the sun in a straight line on April 13 or 14 on the Gregorian calendar in recent years. This marks the day of the New Year.

As soon as the Earth enters Mesa Reasey, it is the first day of New Year called Songkran day. The calendar calculation from Mr. Roath Kim Seang shows how Loeung Sak date is calculated. Then we can calculate the time and day of week of the the Songkran. Using the same algorithm, we determine the length of Vonobot to know when the sonkran date took place.

Similarly, Laeoung Sak time is the date and time calculated by Horas to determine the ending of the celebration, thus determining if the celebration is 3 or 4 days long.

Songkran Date (ថ្ងៃ​សង្រ្កាន្ដ) Calculation

Songkran date calculation is based on Leungsak day (ថ្ងៃ​ឡើងស័ក). Vonobot (វនប័ត) calculation determine if Vonobot day is the typically one day or the rare case of two days. Thus making Khmer New Year 3 days or 4 days (Vonobot has 2 days). From the Leungsak day, you subtract the Vonobot day(s) to find Songkran date. The Leungsak date used the calculation shown earlier in the Chhankitek calculation with additional conditions as follow.

Leungsak Day of the Week

Day of the week of Songkran Day called Pea (ពារ​ឡើងស័ក). It is calculated using the value from Ahkakun calculation.

 $ahk = get_akhakun($be_year);
 $pea = $ahk % 7;

Result of 0-6 is the day of the week where 0:Sat, 1:Sun, 2:Mon, .. 6:Fri.

Leungsak Date

Songkran date calculation use the value from Botethei calculation as follow:

$CHAET = 5;
$PISAK = 6;
$bot = get_botethei($be_year);
if ($bot >=6) {
   $month = $CHAET;
   # check for previous year for (type 3)
   $botleap = get_botethei_leap($ad_year - 1);
   if ($botleap == 3) { // uon case
     $bot++;
   }
} else {
   $month = $PISAK;
   $bot++;
}
return array($bot, $month);

The result is the date $bot and the month $month.

Songkran Calculation

The Songkran calculation has 3 sections (មធ្យម​ព្រះអាទិត្យ, ផល​លម្អិត, and សំផុត​ព្រះអាទិត្យ).

Matyum (មធ្យម​ព្រះអាទិត្យ)

Matym calculation is based on Kromtopul value and Sotin with posible value of 363, 364, 365, and 366. Kromtopul is calculate as follow:

function get_kromtupol($js_year) {
 $t = $js_year * 292207 + 373;
 $ahk = floor($t / 800) + 1;
 $mod = $t % 800;
 $krom = 800 - $mod;
 return $krom;
}
 

With Kromtupol of a specific Jolsakarach (ចុលសករាជ្យ), the Maytum is calculated based on 4 values of Sotin. This calculation will result in Rasey (រាសី), Angsa (អ័ង្សា), and Liba (លិប្តា) as follow:

function matyom($krom, $sotin) {
 $d1 = ($sotin * 800) + $krom ;
 $rasey = floor($d1 /24350);
 $mod1 = $d1 % 24350;
 $angsa = floor($mod1 / 811);
 $mod2 = $mod1 % 811;
 $liba = floor($mod2/14) - 3;
 return array($rasey, $angsa, $liba);
}

PhalLumet (ផល​លម្អិត)

This calcuation determines the angsa and liba for sotin 363.

function phalLumet($mat) {
  $rdif = $mat[0] - 2; # always 9 since mat[0] is 11
  $adif = $mat[1] - 20;
  $ken = array($rdif, $adif, $mat[2]);
  $kenr=$rdif;
   switch($kenr) {
   case 0:
   case 1:
   case 2:
     $phal = array($kenr,0,0);
   break;
   case 3:
   case 4:
   case 5:
     $adijak2 = array(5,29,60);
     $phal = subtractR($adijak2,$ken);
   break;
   case 6:
   case 7:
   case 8:
     $six = array(6,0,0);
     $phal = subtractR($ken,$six);
   break;
   case 9:
   case 10:
   case 11:
     $tvea2 = array(11, 29 ,60);
     $phal = subtractR($tvea2,$ken);
     $phal = reduceR($phal);
     break;
   }
   $kon = ($phal[0]*2)+1;
   $chaya = 129;
   $t = (($phal[1]-15)*60+30)*$kon;
   $lup = floor($t / 900);
   $t3 = $lup + $chaya;
   $angsa = floor($t3/60);
   $liba = $t3 % 60;
   $phal = array(0, $angsa, $liba);
   return $phal;
}

Somphot (សំផុត​ព្រះអាទិត្យ)

This tells about the Songkran date in the form of Rasey, Angsa, and Liba with possible value of (0, 0, 0-59) respectively.

function somphotSun($mat,$phal) {
   # mat + phal
   $sompot = addR($mat, $phal);
   $sompot = reduceR($sompot);
   return $sompot;
}


Based on the Somphot value for each Sotin (363, 364, 365, 366), we can determine if Vonobot has one or two days. Vonobot has two days if there is a duplicate Angsa value in the Somphot values.

# @return 0=no dup, 1=has dup
function isDupAngsa($somphotList) {
 $dup = array(0);
 for($i=0; $i<4; $i++) {
   $val = $somphotList[$i][1];
   $dup[$val]=$dup[$val] + 1;
 }
 foreach($dup as $v) {
   if ($v > 1)
     return 1;
 }
 return 0;
}

Determine if Sotin is 364 as follow:

#   Sompot Sun case 1: r11,h29,l(0-59), r0,h0,l(0-59), r0,h1..., r0,h2,...
#   case 1: new year sompot r0,h0.l(0-59) = sotin 364
function isSotin364($somphotList) { 
  if ($somphotList[0][0]==11 &&  $somphotList[0][1]==29 && 
    $somphotList[1][0]==0  &&  $somphotList[1][1]==0 && 
    $somphotList[2][0]==0  &&  $somphotList[2][1]== 1) {
    return 1;
  }
  return 0;
} 

Get Sotin value:

function getSotin($js_year, $krom) {
   $sotin = 363;
   $ad = getAD($js_year);
   $loop = 4;
   $somphotlist[0] = array(0,0,0);
   $old_sotin = $sotin;
   for($i=0; $i<$loop; $i++) {
     $sotin = $old_sotin + $i;
     $mat = matyom($krom,$sotin);
     $phal = phalLumet($mat);
     $somphot = somphotSun($mat,$phal);
     $somphotlist[$i] = $somphot;
   }

   $dupAngsa = isDupAngsa($somphotlist);
   $sotin = 363;
   $sotin364 = isSotin364($somphotlist);
   if ($sotin364==1) {
     $sotin = 364;
   }
   return array($sotin, $dupAngsa);
}

To put together, we have the full Songkran function as follow:

# return array of Songkran time and Vonobot value (1 or 2)
function get_songkran($ad_year) {
 $jsyear = convertADtoJS($ad_year);
 $krom = get_kromtupol($jsyear-1);
 $ad = getAD($jsyear);
 $sotinR = getSotin($jsyear, $krom);
 $sotin = $sotinR[0];
   $vonobot = 1;
   if($sotinR[1]==1) {
     $vonobot = 2;
     # vonobot has 2 days
   }
 #matyom Sun
 $mat = matyom($krom,$sotin);

 $phal = phalLumet($mat);
 $somphot = somphotSun($mat,$phal);
 $liba = $somphot[2];
 $time = songkranTime($liba);
 $songkran = array();
 $songkran[0] = $vonobot;
 $songkran[1] = $time;
 return $songkran;
}

Songkran Time Calculation

Songkran time is based on the result of Liba (លិប្តា).

# ​Use liba from Somphot Sun
# @return array[hour, minute]
function songkranTime($liba) {
if ($lipta > 59) {
return "Error: lipta can't be greater than 59.";
}
$lup = floor($lipta * 4 / 10);
$rem = ($lipta * 4) % 10;
$min = floor($rem * 60 / 10);
$chour = 23;
$cmin = 60;
$min = $cmin - $min;
$hour = $chour - $lup;
$time = array($hour, $min);
return reduceTime($time);
}

Songkran Time and Date Table

The following are list of Songkran time and date with Leoung Sak date.

Year in ADYear in JSSongkran DateSongkran TimeLoeung Sak Date
19901352៤រោច ខែចេត្រ03:36៦រោច ខែចេត្រ
19911353១កើត ខេពិសាខ09:36៣កើត ខែពិសាខ
19921354១១កើត​ ខែចេត្រ15:12១៣កើត​ ខែចេត្រ
19931355៨រោច ខែចេត្រ22:00១០រោច ខែចេត្រ
19941356៤កើត​ ខែចេត្រ04:24៦កើត​ ខែចេត្រ
19951357១៤កើត​ ខែចេត្រ10:24១រោច ខែចេត្រ
19961358១០រោច ខែចេត16:00១២រោច ខែចេត
19971359៦កើត​ ខែចេត្រ22:48៩កើត​ ខែចេត្រ
19981360៣រោច ខែចេត05:12៥រោច ខែចេត
19991361១៤រោច ខែចេត្រ11:12២កើត ខែពិសាខ
20001362១០រោច ខែចេត16:48១២រោច ខែចេត
20011363៥រោច ខែចេត្រ23:36៨រោច ខែចេត្រ
20021364៣កើត ខែពិសាខ06:00៥កើត ខែពិសាខ
20031365១៣កើត​ ខែចេត្រ12:00១៥កើត​ ខែចេត្រ
20041366៩រោច ខែចេត្រ17:36១១រោច ខែចេត្រ
20051367៦កើត​ ខែចេត្រ00:48៨កើត​ ខែចេត្រ
20061368១រោច ខែចេត្រ06:48៣រោច ខែចេត្រ
20071369១២រោច ខែចេត្រ12:48១៤រោច ខែចេត្រ
20081370៨កើត​ ខែចេត្រ18:24១០កើត​ ខែចេត្រ
20091371៥រោច ខែចេត្រ01:36៧រោច ខែចេត្រ
20101372១កើត ខែពិសាខ07:36៣កើត ខែពិសាខ
20111373១១កើត​ ខែចេត្រ13:36១៣កើត​ ខែចេត្រ
20121374៧រោច ខែចេត្រ19:12៩រោច ខែចេត្រ
20131375៤កើត​ ខែចេត្រ02:24៦កើត​ ខែចេត្រ
20141376១៥កើត​ ខែចេត្រ08:24២រោច ខែចេត្រ
20151377១១រោច ខែចេត្រ14:24១៣រោច ខែចេត្រ
20161378៨កើត​ ខែចេត្រ20:00១០កើត​ ខែចេត្រ
20171379៣រោច ខែចេត្រ03:12៥រោច ខែចេត្រ
20181380១៤រោច ខែចេត្រ09:12២កើត ខែពិសាខ
20191381១០កើត​ ខែចេត្រ15:12១២កើត​ ខែចេត្រ
20201382៧រោច ខែចេត្រ20:48៩រោច ខែចេត្រ