未验证 提交 75e0ed3c 编写于 作者: O openharmony_ci 提交者: Gitee

!9948 time文档修改

Merge pull request !9948 from 王江颖/master
...@@ -357,7 +357,7 @@ setDate(date: Date, callback: AsyncCallback<void>): void ...@@ -357,7 +357,7 @@ setDate(date: Date, callback: AsyncCallback<void>): void
**示例:** **示例:**
```js ```js
var data = new Date("October 13, 2020 11:13:00"); var data = new Date();
systemTime.setDate(data,(error, data) => { systemTime.setDate(data,(error, data) => {
if (error) { if (error) {
console.error('failed to systemTime.setDate because ' + JSON.stringify(error)); console.error('failed to systemTime.setDate because ' + JSON.stringify(error));
...@@ -393,7 +393,7 @@ setDate(date: Date): Promise<void> ...@@ -393,7 +393,7 @@ setDate(date: Date): Promise<void>
**示例:** **示例:**
```js ```js
var data = new Date("October 13, 2020 11:13:00"); var data = new Date();
systemTime.setDate(data).then((value) => { systemTime.setDate(data).then((value) => {
console.log(`systemTime.setDate success data : ` + JSON.stringify(value)); console.log(`systemTime.setDate success data : ` + JSON.stringify(value));
}).catch((error) => { }).catch((error) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册