public class Dateutil {
/**
* 取得当前日期是多少周
*
* @param date
* @return
*/
public static int getWeekOfYear(Date date) {
Calendar c = new GregorianCalendar();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setMinimalDaysInFirstWeek(7);
c.setTime (date);
return c.get(Calendar.WEEK_OF_YEAR);
}
/**
* 得到某一年周的总数
*
* @param year
* @return
*/
public static int getMaxWeekNumOfYear(int year) {
Calendar c = new GregorianCalendar();
c.set(year, Calendar.DECEMBER, 31, 23, 59, 59);
return getWeekOfYear(c.getTime());
}
/**
* 得到某年某周的第一天
*
* @param year
* @param week
* @return
*/
public static Date getFirstDayOfWeek(int year, int week) {
Calendar c = new GregorianCalendar();
c.set(Calendar.YEAR, year);
c.set (Calendar.MONTH, Calendar.JANUARY);
c.set(Calendar.DATE, 1);
Calendar cal = (GregorianCalendar) c.clone();
cal.add(Calendar.DATE, week * 7);
return getFirstDayOfWeek(cal.getTime ());
}
/**
* 得到某年某周的最后一天
*
* @param year
* @param week
* @return
*/
public static Date getLastDayOfWeek(int year, int week) {
Calendar c = new GregorianCalendar();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, Calendar.JANUARY);
c.set(Calendar.DATE, 1);
Calendar cal = (GregorianCalendar) c.clone();
cal.add(Calendar.DATE , week * 7);
return getLastDayOfWeek(cal.getTime());
}
/**
* 取得指定日期所在周的第一天
*
* @param date
* @return
*/
public static Date getFirstDayOfWeek(Date date) {
Calendar c = new GregorianCalendar();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setTime(date);
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); // Monday
return c.getTime ();
}
/**
* 取得指定日期所在周的最后一天
*
* @param date
* @return
*/
public static Date getLastDayOfWeek(Date date) {
Calendar c = new GregorianCalendar();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setTime(date);
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() + 6); // Sunday
return c.getTime();
}
/**
* 取得当前日期所在周的第一天
*
* @param date
* @return
*/
public static Date getFirstDayOfWeek() {
Calendar c = new GregorianCalendar();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setTime(new Date());
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); // Monday
return c.getTime ();
}
/**
* 取得当前日期所在周的最后一天
*
* @param date
* @return
*/
public static Date getLastDayOfWeek() {
Calendar c = new GregorianCalendar();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setTime(new Date());
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() + 6); // Sunday
return c.getTime();
}
/*
*
public static void main(String[] args) {
int year = 2009;
int week = 1;
// 以2006-01-02位例
Calendar c = new GregorianCalendar();
c.set(2009, Calendar.DECEMBER, 7);
Date d = c.getTime();
System.out.println("current date = " + d);
System.out.println("getWeekOfYear = " + getWeekOfYear(d));
System.out.println("getMaxWeekNumOfYear = " + getMaxWeekNumOfYear(year));
System.out.println("getFirstDayOfWeek = " + getFirstDayOfWeek(year, week));
System.out.println("getLastDayOfWeek = " + getLastDayOfWeek(year, week));
System.out.println ("getFirstDayOfWeek = " + getFirstDayOfWeek(d));
System.out.println("getLastDayOfWeek = " + getLastDayOfWeek(d));
System.out.println ("getFirstDayOfWeek = " + getFirstDayOfWeek());
System.out.println("getLastDayOfWeek = " + getLastDayOfWeek());
}
*/
}
今,天下遭遇百年经济危机,试看全球经济形势,可谓哀鸿遍野,民不聊生,众厂商、工人、民工皆叫苦连天,司某人有感于此,不禁联想自身处境,不胜伤悲,呜呼哀哉!
司本布衣,自幼出身贫寒,躬耕于冀南邢州大地,苟全性命于当世,不求闻达于富贵,但求温饱以残喘。然现实残酷之至,司自去岁四月上旬至本社工作至今,已一载有余,几度春秋几度冬夏,时光流逝过三百余个日日夜夜。想当初,余本一意气少年,年少轻狂,梦想飞扬,欲于本社大展抱负,一则为集团增光添彩,二则为己身加衣增食,两全其美之策,岂不爽哉?惜,一年光阴,吾不仅未大展身手,且囊中羞涩,债台高筑,衣缩食,杜绝聚会。
众朋友离去者,有之;鄙视者,有之;唾弃者,有之。皆因司某昔日之优秀少年竟完全失去自我至此所致。司每月九百大钱竟是基础工资、岗位津贴以及误餐补助相加之结果……众友云:“甚矣,汝之不慧,竟容忍至今,不死何为?”余汗颜,余何尝不想多整几两纹银,上对的起天、下对得起地、中间对得起空气;然而,余出身农家,是苦皆,是事皆能忍,只可惜终究徒劳无功,虽兢兢业业终究温饱都不得解决,今面容竟呈老态龙钟之相。何也?食不饱,力不足,才美不外现,故犹如千里马,虽有千里之能,然无奈唯有饿死圈中……
司虽不才,不敢以千里马自居,然自知亦不是一庸者。人之立于当世,需一技之长,司某自视甚低,不敢自称满腹经纶,然应付文字之事亦不在话下;然,一载以来,每每扪心自问,无不捶胸顿足,几欲洒泪襟前。何也?漫漫长夜,孤枕难眠,辗转反侧,陋室忆昔,每日之工作唯“清洁”二字……即打扫房屋若干、倒水端茶、虚伪客套,***于各所谓领导之间,日复一日,月复一月,受命以来,夙夜忧叹,兢兢业业,诚惶诚恐,畏有所疏漏懈怠……今扶膝自叹,何等悲哀!
桃花谢了春红,太匆匆,年华如水,倏忽间春夏秋冬四季已轮回三百六十度。茫然回首,所得几何?所失几何?今不得不略作盘点:所得——物质上:工作十二月,前三月每月六百,后九月每月九百,区区数千一年来不够司某解决温饱,更何谈穿衣游玩,过品质生活;精神上:备受打击煎熬,一年来新掌握一技之长,即打扫卫生,司某好歹一堂堂男子汉,本科毕业生,其不才之至,亦不应沦为清洁工之列,故使其当年年少轻狂之心瞬间苍老,再无活力;一载以来,司某唯唯诺诺,伺候他人胜过关心自己,其所求,仅每日温饱问题,然随物价飞涨,此问题之解决亦不可得。所失——失去了时间、浪费了青春、耽误了大好年华、愧对父母兄姐、做人尊严消失殆尽……
然,何以堂堂风华正茂之青年司某人压抑之至,努力坚持到如今,唯一原因:在等待传说中众人期盼的涨工资之事而已。实在可怜,怪司某年幼无知,竟傻傻苦等一年,终究未果;司某一年来生活所需之数千外债亦无望偿还,故司某人顿悟:此处系年轻人之坟墓也,唯一功能即埋没梦想、埋没青春、消磨斗志、耗费光阴,如是而已。故,顿悟之司某人今决定不应消磨于此,做出选择的时刻已到来。
话说天下势,分久必合,合久必分!既此处不留司某,司某亦不便继续打扰贵处,既不能两惜,何不两离,从此,彼此相忘于江湖!以决绝的姿态!
今恳请开明之领导准许卑微无能之员工司某人辞职,不胜感激!
毕!
继上篇http://rensanning.iteye.com/blog/1440679 Titanium在全球移动通信系统协会(GSMA)的移动通信世界大会(MWC)获得2012年最佳云技术平台之后,昨天(2012/03/27)他们又宣布获得了6项工业大1奖。
其中包括:美国软体暨资讯工业协会 (SIIA)颁发的科迪奖(Codie Awards)、OnDemand Top 100、Edison Nominee、MobileTrax’s Mobility Award等。
至此,Appcelerator已经获得7项大奖:
http://www.prweb.com/releases/2012-appcelerator/mobile-industry-awards/prweb9332753.htm
以下原文:
- SIIA’s CODiE Award finalist for “Best Use of Open Source Technology”
- AlwaysOn’s “OnDemand Top 100”
- Edison Nominee for “Best New Product in Innovative Services”
- MobileTrax’s Mobility Award in the "Mobile Software: Application Development (Consumer)" category
- Silicon Valley Business Journal’s “Best Places to Work in the Bay Area”
- Lead411’s “2012 Hottest Silicon Valley Companies”
“Appcelerator’s long-standing commitment has been to help our customers and developer community to be as successful as possible. To do this, we are continuously improving our Titanium platform so that it can deliver greater value to advance their mobile strategies,” commented Jeff Haynie, co-founder and CEO of Appcelerator. “We are honored that these esteemed organizations recognized our company, products and approach. We will continue to innovate in order to help our customers and developer community stay ahead of the mobile and app development curve.”
Appcelerator Titanium Platform Receives Top Honors
Appcelerator’s trove of award recognitions underscores Titanium’s usability, extensibility and economic advantages for developers and brands looking to seize opportunities in the burgeoning mobile landscape.
Titanium’s top honors include:
- SIIA CODiE Award Nominee for Best Use of Open Source Technology: Presented by the Software & Information Industry Association (SIIA), this award honors the best commercial software or services solution developed from open source code. Titanium is a finalist in the “Best Use of Open Source Technology” for significantly enhancing the cross-platform mobile application development landscape.
- AlwaysOn OnDemand Top 100: This honor goes to game-changing approaches and technologies that are disrupting existing markets and entrenched players. Appcelerator won in the “Cloud Application Platforms” category for creating new opportunities in cloud computing, and was selected based on a set of five criteria: innovation, market potential, commercialization, stakeholder value, and media buzz.
- Edison Award Nominee for Best New Product in Innovative Services: Now in its 25th year, this annual highly-regarded award showcases the best ideas and excellence in the development, marketing and launch of new products and services. Appcelerator Titanium was selected a finalist in the “Best New Product: Innovative Services” category for its innovation, creativity, and ingenuity in raising the bar in mobile development across the global economy.
- MobileTrax Mobility Award in Mobile Software Application Development: The finest mobile and wireless products and services are honored with a Mobility Award. Appcelerator Titanium was selected as a finalist in the “Mobile Software: Application Development (Consumer)” category for having an impact on the mobile industry.
Company Growth on Fast Track
Appcelerator is experiencing rapid growth as it helps companies scale their mobile strategies. Over the past year, the company has attracted top-tier investors including Sierra Ventures, Mayfield Fund, TransLink Capital, and Relay Ventures, and opened a London office. The following award recognitions further demonstrate the company’s achievements.
- Silicon Valley Business Journal’s Best Places to Work: The “Best Places to Work in the Bay Area” is an annual ranking that is assessed by employee opinion surveys. Earning a spot on the list endorses how Appcelerator’s leaders are committed to providing a corporate culture that fosters creativity, financial security and employee recognition.
- Lead411 Hottest Companies in Silicon Valley: Lead411 ranks the hottest and fastest growing companies across various regions on an annual basis. Of more than 3,000 companies in Silicon Valley, Appcelerator was selected as one of the top 80 “Hottest Companies in Silicon Valley” based on the company’s growth.
This latest string of recognitions comes on the heels of Appcelerator’s recent GSMA Global Mobile Award, where judges named Titanium “Best Cloud-Based Technology.”
To learn more about Appcelerator and its award-winning mobile cloud products, visit: http://www.appcelerator.com.
About Appcelerator
Appcelerator’s Titanium is the leading mobile platform of choice for thousands of companies seizing the mobile opportunity. With more than 35,000 applications deployed on 40 million devices, Appcelerator’s award-winning Titanium Platform leverages over 5,000 mobile device and operating system APIs to create native iOS and Android apps, and HTML5 mobile web apps. Customers who standardize on the Titanium Platform get to market 70% faster and can quickly optimize business results with analytics-driven insights into user behavior and app performance. Open and fully extensible, Titanium makes it easy to integrate data, content and services from a variety of sources into mobile applications to leverage best-of-breed capabilities. Appcelerator Cloud Services (ACS) provides instant social, location, communication and content features for user-centric mobility. ACS is pre-integrated into the Titanium Platform and is also separately available for all mobile developers and publishers. Appcelerator’s worldwide ecosystem includes 1.6M developers and hundreds of ISVs and integration partners. Please visit http://www.appcelerator.com.
Appcelerator is a registered trademark of Appcelerator Inc. Appcelerator Titanium is a trademark of Appcelerator Inc. All other trademarks and copyrights are the property of their respective owners.