i have this date : 28 september 2007.
I need this output : 007271
I'm using this code :
<?php
$julianDate = gregoriantojd(9, 28, 2007);
$dayfrac = date('G') / 24 - .5;
if ($dayfrac < 0) $dayfrac += 1;
$frac = $dayfrac + (date('i') + date('s') / 60) / 60 / 24;
$julianDate = $julianDate + $frac;
echo($julianDate);
?>
My current output : 2454372.81824
I search on google and I found this website :
When I try his tool with my date the output is :
"Jour Julien : 2454371.5" AND "Jour : 271 Année : 2007"
How can I complete this task? I don't know how to find the number of the day so I can concatenate it with the year so : AAA . JJJ
Thanks alot.
the 28 septembre is the 271 days from the begin of the year 01 January ...
This may help you to identify
<?php
$date = strtotime('28 september 2007');
$date1 = strtotime('01 january 2007');
//this may helps
echo round(($date - $date1)/(60*60*24));
?>