Home  >  Article  >  Web Front-end  >  Use the toString() method to return the time as a string

Use the toString() method to return the time as a string

PHP中文网
PHP中文网Original
2017-05-25 14:50:051627browse

This method returns a string representing the specified date object.
Syntax

Date.toString()

The following are the details of the parameters:

  • NA

Return value:

Returns a string representing the specified date object
Example:

JavaScript toString Method

Related recommendations】

1. Detailed explanation of valueOf method examples in Java

2. The difference between valueOf and toString, (String) in Java

3. Usage of tostring() and valueof() and the difference between the two

4. In-depth understanding of valueOf function and toString method

5. Introduction to object conversion functions toString() and valueOf()

6. The difference between valueOf, parseInt and toString in Java

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn