@mwittig The weekday is received by .weekday()
Thats all the magic:
currentDate = new Date()
@unixTimestamp = currentDate.getTime()
moment = Moment(currentDate)
if @timezone?
moment.tz(@timezone)
if @locale
moment.locale(@locale)
@dayOfWeek = moment.weekday()
@dayOfMonth = moment.date()
@time = moment.format('HH:mm')
@date = moment.format('L')
@datetime = @date + " " + @time
if @dateformat?
@formatted = moment.format(@dateformat)
else
@formatted = moment.format()
The format String I used was:
YYYY-MM-dd HH:mm:SS