| @@ 34-40 (lines=7) @@ | ||
| 31 | * @param int $step |
|
| 32 | * @return GenericList |
|
| 33 | */ |
|
| 34 | public static function days($start = 1, $end = 31, $step = 1) |
|
| 35 | { |
|
| 36 | return GenericList::forge($start, $end, $step)->setFormat( |
|
| 37 | function ($day) { |
|
| 38 | return sprintf('%02d', $day); |
|
| 39 | }); |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @param int|null $start |
|
| @@ 48-54 (lines=7) @@ | ||
| 45 | * @param int $step |
|
| 46 | * @return GenericList |
|
| 47 | */ |
|
| 48 | public static function hours($start = 0, $end = 23, $step = 1) |
|
| 49 | { |
|
| 50 | return GenericList::forge($start, $end, $step)->setFormat( |
|
| 51 | function ($hour) { |
|
| 52 | return sprintf('%02d', $hour); |
|
| 53 | }); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @param int|null $start |
|
| @@ 62-68 (lines=7) @@ | ||
| 59 | * @param int $step |
|
| 60 | * @return GenericList |
|
| 61 | */ |
|
| 62 | public static function minutes($start = 0, $end = 59, $step = 5) |
|
| 63 | { |
|
| 64 | return GenericList::forge($start, $end, $step)->setFormat( |
|
| 65 | function ($min) { |
|
| 66 | return sprintf('%02d', $min); |
|
| 67 | }); |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * @param int|null $start |
|
| @@ 76-82 (lines=7) @@ | ||
| 73 | * @param int $step |
|
| 74 | * @return GenericList |
|
| 75 | */ |
|
| 76 | public static function seconds($start = 0, $end = 59, $step = 15) |
|
| 77 | { |
|
| 78 | return GenericList::forge($start, $end, $step)->setFormat( |
|
| 79 | function ($sec) { |
|
| 80 | return sprintf('%02d', $sec); |
|
| 81 | }); |
|
| 82 | } |
|
| 83 | } |
|