All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists matching topic calculation

Recently created
Least recently created
Recently updated
Least recently updated

airikr / Calculate age

0 likes
0 forks
1 files
Last active 19 hours ago
Calculate the age of someone or something.
calculation function php
1 <?php
2
3 # Add the time for a more accurate calculation.
4 # The time format must be a string if it begins with a zero (0)
5
6 function age($year, $month, $day, $time = null) {
7 if(!is_numeric($year) OR !is_numeric($month) OR !is_numeric($day)) {
8 return 'XX';
9
10 } else {
Newer Older

Powered by Opengist ⋅ Load: 9ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文