Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101388605
meridiem.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
Sun, Feb 9, 23:35
Size
419 B
Mime Type
text/x-c++
Expires
Tue, Feb 11, 23:35 (2 d)
Engine
blob
Format
Raw Data
Handle
24149996
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
meridiem.js
View Options
'use strict'
;
const
DatePart
=
require
(
'./datepart'
);
class
Meridiem
extends
DatePart
{
constructor
(
opts
=
{})
{
super
(
opts
);
}
up
()
{
this
.
date
.
setHours
((
this
.
date
.
getHours
()
+
12
)
%
24
);
}
down
()
{
this
.
up
();
}
toString
()
{
let
meridiem
=
this
.
date
.
getHours
()
>
12
?
'pm'
:
'am'
;
return
/\A/
.
test
(
this
.
token
)
?
meridiem
.
toUpperCase
()
:
meridiem
;
}
}
module
.
exports
=
Meridiem
;
Event Timeline
Log In to Comment