php.js : time() function

Description

The time() function returns current Unix timestamp.

Remarks : The Unix timestamp measures time as number of seconds since midnight of Greenwich Mean Time on January 1,1970.

Version

1103.1210

Syntax

time()

Example of php.js time() function  

In the following web document time() function returns the current time as Unix timestamp.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>php.js : time() function example</title>
<script type="text/javascript" src="../../phpjs/date/datetime.min.js"> </script>
</head>
<body>
<h1 style="color: green">php.js : time() function example</h1>
<h3>Returns the current time as Unix timestamp.</h3>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[
document.write(time()+'<br>');
//]]>
</script>
</body>
</html>

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

Practice php.js time() function with online editor

Download phpjs.zip

Please Google+, Like this tutorial on FaceBook, Tweet, save it as bookmark and subscribe with our Feed. Have suggestions? comment using Disqus down this page. Thanks.


share with delicious share with facebook w3r rss  share with digg share with reddit share with stumbleupon share with twitter