Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101079497
milliseconds.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 5, 13:09
Size
541 B
Mime Type
text/x-c++
Expires
Fri, Feb 7, 13:09 (2 d)
Engine
blob
Format
Raw Data
Handle
24090361
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
milliseconds.js
View Options
'use strict'
;
const
DatePart
=
require
(
'./datepart'
);
class
Milliseconds
extends
DatePart
{
constructor
(
opts
=
{})
{
super
(
opts
);
}
up
()
{
this
.
date
.
setMilliseconds
(
this
.
date
.
getMilliseconds
()
+
1
);
}
down
()
{
this
.
date
.
setMilliseconds
(
this
.
date
.
getMilliseconds
()
-
1
);
}
setTo
(
val
)
{
this
.
date
.
setMilliseconds
(
parseInt
(
val
.
substr
(
-
this
.
token
.
length
)));
}
toString
()
{
return
String
(
this
.
date
.
getMilliseconds
()).
padStart
(
4
,
'0'
).
substr
(
0
,
this
.
token
.
length
);
}
}
module
.
exports
=
Milliseconds
;
Event Timeline
Log In to Comment