使用Datejs - 获取星期几 [英] Using Datejs - Get the day of the week

查看:167
本文介绍了使用Datejs - 获取星期几的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 http://www.datejs.com/
我必须错过它,但是有一种方式可以通过日/月/年,并告诉我这是星期五还是星期一或者什么?

I'm using http://www.datejs.com/. I must be missing it, but is there a way I can pass it the day/month/year and have it tell me that it's a Friday or Monday or whatever?

推荐答案

你想要:

.toString(dddd);

例如:

> Date.parse("1.16.2012").toString("dddd");
"Monday"

这篇关于使用Datejs - 获取星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆