MCPcopy Create free account
hub / github.com/codecombat/codecombat / getDateString

Function getDateString

ozaria/site/common/utils.js:4–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import storage from '../../../app/core/storage'
3
4function getDateString () {
5 const date = new Date()
6
7 const mm = date.getMonth() + 1
8 const dd = date.getDate()
9
10 return [
11 date.getFullYear(),
12 (mm > 9 ? '' : '0') + mm,
13 (dd > 9 ? '' : '0') + dd
14 ].join('')
15}
16
17export function deterministicShuffleForUserAndDay (user, originalArray) {
18 if (originalArray.length < 2) return originalArray

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected