Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
chenjun
2024-08-22 17:54:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fad0f87065bb9d1159e190f4a77c297448b857f8
fad0f870
1 parent
35f0d367
安卓时间对齐
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/DateTimeUtils.ts
sight_harmony/commons/wdKit/src/main/ets/utils/DateTimeUtils.ts
View file @
fad0f87
import
{
StringUtils
}
from
'./StringUtils'
;
import
getLunar
from
'./GetLunar'
;
import
{
systemDateTime
}
from
'@kit.BasicServicesKit'
;
/**
* 日期/时间工具
...
...
@@ -436,7 +437,8 @@ export class DateTimeUtils {
* 获取文章发布时间
* */
public
static
getCommentTime
(
publishTime
:
number
):
string
{
let
currentTime
:
number
=
new
Date
().
getTime
();
// let currentTime: number = new Date().getTime();
let
currentTime
:
number
=
systemDateTime
.
getTime
(
false
);
let
timeGap
=
currentTime
-
publishTime
;
let
timeStr
=
""
if
(
timeGap
>=
60
*
60
*
1000
*
48
)
{
...
...
Please
register
or
login
to post a comment