-2

I have a piece of code which generates Julian date, but i need to generate a three digit Julian date. Can any help me out

Code:

$jd = GregorianToJD(08, 02, 2013);

Output: 2456507

GoSmash
  • 1,096
  • 1
  • 11
  • 38

1 Answers1

0

see this function cal_from_jd return tree of calendar information like month, day, year, day of week http://www.php.net/manual/en/function.cal-from-jd.php

  $jd = GregorianToJD(08, 02, 2013);
  print_r(cal_from_jd($jd, CAL_JULIAN));

if you have php 5.3 and newer version you can use IntlDateFormatter that can convert To all calender and timezone
http://www.php.net/manual/en/class.intldateformatter.php

mohammad mohsenipur
  • 3,218
  • 2
  • 17
  • 22