惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

博客园 - cyberghost

Padavan 路由器配置 Cloudflare DDNS Linux关闭占用特定端口的进程 Jackson反序列化泛型List Oracle SQL Developer更改DATE日期的显示格式 解决Navicat导入psc备份文件数据为空 Maven配置环境变量 org.hibernate.LazyInitializationException: could not initialize proxy - no Session Maven项目导出jar包 Eclipse配置Go语言开发环境(GoEclipse) Maven项目设置JDK版本 PowerDesigner16下载和破解 Ubuntu安装JDK配置环境变量 Ubuntu添加eclipse快捷方式 JDK配置环境变量 springMVC获得HttpServletRequest对象 Struts Action返回xml FusionCharts Free解决setDataURL中文乱码 使用FusionCharts Free显示图表(JSP) Ajax实现表单验证
Java判断指定日期是星期几
cyberghost · 2013-06-09 · via 博客园 - cyberghost
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
        Date date = formater.parse("2013-6-10");
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        int dayForWeek = 0;  
        if(c.get(Calendar.DAY_OF_WEEK) == 1){  
            dayForWeek = 7;  
        }else{  
            dayForWeek = c.get(Calendar.DAY_OF_WEEK) - 1;  
        }  
        System.out.println(dayForWeek);

posted @ 2013-06-09 14:42  cyberghost  阅读(885)  评论(0)    收藏  举报