php.js : gmmktime() function

gmmktime() function

The gmmktime() function is used to get Unix timestamp for a GMT date.




gmmktime(hour, minute, second, month, day, year)


Name Description Required/ Optional Type
hour Specifies the hour Optional integer
minute Specifies the minute Optional integer
second Specifies the second Optional integer
month Specifies the month Optional integer
day Specifies the day Optional integer
year Specifies the year Optional integer

Example of php.js gmmktime() function.  :

In the following web document gmmktime() function returns Unix timestamp for a given date.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>php.js : gmmktime() function example</title>
<script type="text/javascript" src="../../phpjs/date/datetime.min.js"> </script>
<h1 style="color: green">php.js : gmmktime() function example</h1>
<h3>UNIX timestamp for a GMT date</h3>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[

Output of the function:


View the example of php.js gmmktime() function in the browser

Download phpjs.zip

Previous: php.js: gmdate() function
Next: php.js : gmstrftime() function

Follow us on Facebook and Twitter for latest update.