Date et heure du jour


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/perl
  2.  
  3. my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
  4. my $dateUs = ($mon+1)."/".$mday."/".(1900+$year);
  5. print "nous sommes le ",$dateUs;
  6.  
  7. /* ------ pour information ----- */
  8. /* seconds (0 - 59) */
  9. /* minutes (0 - 59) */
  10. /* hours (0 - 23) */
  11. /* day of month (1 - 31) */
  12. /* month of year (0 - 11) */
  13. /* year - 1900 */
  14. /* day of week (Sunday = 0) */
  15. /* day of year (0 - 365) */

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.