You are here

function cmfcCalendarV1Thai::strToTimestamp in Calendar Systems 7.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/thai.class.inc.php \cmfcCalendarV1Thai::strToTimestamp()
  2. 8.2 calendar/v1/calendarSystems/thai.class.inc.php \cmfcCalendarV1Thai::strToTimestamp()
  3. 6 calendar/v1/calendarSystems/thai.class.inc.php \cmfcCalendarV1Thai::strToTimestamp()
  4. 7 calendar/v1/calendarSystems/thai.class.inc.php \cmfcCalendarV1Thai::strToTimestamp()

Overrides cmfcCalendarV1::strToTimestamp

File

calendar/v1/calendarSystems/thai.class.inc.php, line 66

Class

cmfcCalendarV1Thai

Code

function strToTimestamp($string) {
  $date = explode(' ', $string);
  $date_parts = explode('-', $date[0]);
  $date_parts[0] = $date_parts[0] - 543;
  $date[0] = implode('-', $date_parts);
  $date = implode(' ', $date);
  return strtotime($date);
}