Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

checkdate(3) [php man page]

CHECKDATE(3)								 1							      CHECKDATE(3)

checkdate - Validate a Gregorian date

SYNOPSIS
bool checkdate (int $month, int $day, int $year) DESCRIPTION
Checks the validity of the date formed by the arguments. A date is considered valid if each parameter is properly defined. PARAMETERS
o $month - The month is between 1 and 12 inclusive. o $day - The day is within the allowed number of days for the given $month. Leap $years are taken into consideration. o $year - The year is between 1 and 32767 inclusive. RETURN VALUES
Returns TRUE if the date given is valid; otherwise returns FALSE. EXAMPLES
Example #1 checkdate(3) example <?php var_dump(checkdate(12, 31, 2000)); var_dump(checkdate(2, 29, 2001)); ?> The above example will output: bool(true) bool(false) SEE ALSO
mktime(3), strtotime(3). PHP Documentation Group CHECKDATE(3)

Check Out this Related Man Page

DATE_PARSE_FROM_FORMAT(3)						 1						 DATE_PARSE_FROM_FORMAT(3)

date_parse_from_format - Get info about given date formatted according to the specified format

SYNOPSIS
array date_parse_from_format (string $format, string $date) DESCRIPTION
Returns associative array with detailed info about given date. PARAMETERS
o $format - Format accepted by DateTime.createFromFormat(3). o $date - String representing the date. RETURN VALUES
Returns associative array with detailed info about given date. EXAMPLES
Example #1 date_parse_from_format(3) example <?php $date = "6.1.2009 13:00+01:00"; print_r(date_parse_from_format("j.n.Y H:iP", $date)); ?> The above example will output: Array ( [year] => 2009 [month] => 1 [day] => 6 [hour] => 13 [minute] => 0 [second] => 0 [fraction] => [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) [is_localtime] => 1 [zone_type] => 1 [zone] => -60 [is_dst] => ) SEE ALSO
DateTime.createFromFormat(3), checkdate(3). PHP Documentation Group DATE_PARSE_FROM_FORMAT(3)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

C2 or enhanced security

We are using c2 / enhanced security on digital unix. I do not have access to the GUI. I need to get information on login status for users. Specifically I would like to know who has not logged in within the last 6 months. I think I can query the edauth files, but I can't find information on... (4 Replies)
Discussion started by: MizzGail
4 Replies

2. UNIX for Advanced & Expert Users

password will expire

login: TEST7 TEST7's Password: Your password will expire: Wed Feb 19 14:28:08 2003 How can I the same information become in a script (as example in the .profile)????????? My login starts with .profile. These File is a menue with 24 lines and the message " Your password ....." disappear to... (8 Replies)
Discussion started by: Erwin Stocker
8 Replies

3. Solaris

user acct expiration

how can i tell on a solaris 9 if a user acct has an expiration date? and when that expuiration is. (6 Replies)
Discussion started by: BG_JrAdmin
6 Replies

4. AIX

crontab in AIX

Hi all, i am trying to reduce the file size of /var/adm/wtmp in my AIX servers and im using the method cp /dev/null /var/adm/wtmp to reduce it. I thought of automating it by including this command into crontab. Surprisingly, it doesn't work once i put into crontab, there is no error message thrown... (25 Replies)
Discussion started by: smallbook
25 Replies

5. Shell Programming and Scripting

Laptop/Desktop... Back up/Mirror script.

Hello all, I have a script I am trying to put together, what I am trying to do is mirror my home dir (excluding my music dir) between my desktop and laptop. My intention is to create a cron job to run two scripts, one to push the data to the laptop at the end of the day, and one to pull the data... (5 Replies)
Discussion started by: komputersman
5 Replies

6. Shell Programming and Scripting

Display the last five dates from the given date

Hi all, In Oracle we have got sysdate -1 to find the previous date. Is there any similar way to display date in unix shell scripting? Kindly help me to display the last five dates from the given date Thanks, Geetha (11 Replies)
Discussion started by: iamgeethuj
11 Replies

7. Shell Programming and Scripting

validate date pattern using Regular Expression

Hi, i am java guy and new to unix. I want to validate date pattern using Regex expression here is the sample program i have written. #!/bin/sh checkDate="2010-04-09" regex="\\d{4}-\\d{2}-\\d{2}\$" echo $regex if ] then echo "OK" else echo "not OK" fi But the ouput is... (2 Replies)
Discussion started by: vvenu88
2 Replies

8. Shell Programming and Scripting

Validate time pattern using regular expression

Hi, I am new to scripting. please help me in validating the user entered time Pattern Here is the program #!/bin/bash validateTimeFormat() { checkTime=$1 timePattern="::" if ] then echo "Valid time pattern" return 1 else echo "InValid time pattern" return -1 fi } echo "Please... (2 Replies)
Discussion started by: vvenu88
2 Replies

9. UNIX for Dummies Questions & Answers

How to test each line in a file

Hi guys, I have a file which contains like this: Command was launched from partition 0. ------------------------------------------------ Executing command in server server6 Event Text Mib Trap Status ... (16 Replies)
Discussion started by: rymnd_12345
16 Replies

10. Shell Programming and Scripting

Script to read a log file and run 2nd script if the dates match

# cat /tmp/checkdate.log SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 17 22:49:00 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production FIRST_TIME NEXT_TIME... (1 Reply)
Discussion started by: SarwalR
1 Replies

11. Shell Programming and Scripting

How to send to perl the content of a bash variable as argument?

I want to send the content of a bash variable as a python argument for processing. The problem is that bash doesn't "expand" the content, just sends the expression. script.sh#!/bin/bash export RECEIVEDDATE=$(date +"%Y%m%d.%H%M%S") perl checkdate.py checkdate.pyimport datetime import os... (3 Replies)
Discussion started by: Tribe
3 Replies