Skip to content

Commit

Permalink
add date & leading 0
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenvoise-ubitransport committed Aug 17, 2021
1 parent e319b1f commit 9de6e84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions string/add_leading_zeros/add_leading_zeros.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$myAge = '34';
$myAgeWithLeadingZeros = str_pad($myAge, 5, "0", STR_PAD_LEFT);

echo $myAgeWithLeadingZeros."\n";
5 changes: 5 additions & 0 deletions time/dates/date/date.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$now = date('Y-m-d', time());

echo "$now\n";

0 comments on commit 9de6e84

Please sign in to comment.