Java Doc for DateUtils.java in  » Project-Management » OpenProj » org » jdesktop » swing » calendar » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Project Management » OpenProj » org.jdesktop.swing.calendar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jdesktop.swing.calendar.DateUtils

DateUtils
public class DateUtils (Code)

author:
   Scott Violet
version:
   $Revision: 1.1 $




Method Summary
public static  longaddDays(long time, int amount)
     Adds amount days to time and returns the resulting time.
public static  DateendOfDay(Date date)
     Returns the last millisecond of the specified date.
public static  longendOfDayInMillis(long date)
     Returns the last millisecond of the specified date.
public static  intgetDayOfWeek(long date)
     Returns the day of the week.
public static  intgetDaysDiff(long t1, long t2, boolean checkOverflow)
     Returns the number of days difference between t1 and t2.
public static  intgetDaysDiff(long t1, long t2)
     Returns the number of days difference between t1 and t2.
public static  longgetEndOfMonth(long date)
     Returns the date corresponding to the end of the month.
public static  longgetNextDay(long date, int startOfWeek)
     Returns the first day after date that has the day of week matching startOfWeek.
public static  longgetNextMonth(long date)
     Returns the next month.
public static  longgetPreviousDay(long date, int startOfWeek)
     Returns the first day before date that has the day of week matching startOfWeek.
public static  longgetPreviousMonth(long date)
     Returns the previous month.
public static  longgetStartOfMonth(long date)
     Returns the date corresponding to the start of the month.
public static  booleanisFirstOfMonth(long date)
    
public static  booleanisFirstOfYear(long date)
    
public static  DatenextDay(Date date)
     Returns the day after date.
public static  longnextDay(long date)
     Returns the day after date.
public static  longnextWeek(long date)
     Returns the week after date.
public static  longpreviousDay(long date)
     Returns the day before date.
public static  longpreviousWeek(long date)
     Returns the week before date.
public static  DatestartOfDay(Date date)
     Returns a new Date with the hours, milliseconds, seconds and minutes set to 0.
public static  longstartOfDayInMillis(long date)
     Returns day in millis with the hours, milliseconds, seconds and minutes set to 0.



Method Detail
addDays
public static long addDays(long time, int amount)(Code)
Adds amount days to time and returns the resulting time.
Parameters:
  time - Base time
Parameters:
  amount - Amount of increment.



endOfDay
public static Date endOfDay(Date date)(Code)
Returns the last millisecond of the specified date.
Parameters:
  date - Date to calculate end of day from Last millisecond of date



endOfDayInMillis
public static long endOfDayInMillis(long date)(Code)
Returns the last millisecond of the specified date.
Parameters:
  date - long to calculate end of day from Last millisecond of date



getDayOfWeek
public static int getDayOfWeek(long date)(Code)
Returns the day of the week.
Parameters:
  date - date day of week.



getDaysDiff
public static int getDaysDiff(long t1, long t2, boolean checkOverflow)(Code)
Returns the number of days difference between t1 and t2.
Parameters:
  t1 - Time 1
Parameters:
  t2 - Time 2
Parameters:
  checkOverflow - indicates whether to check for overflow Number of days between start and end



getDaysDiff
public static int getDaysDiff(long t1, long t2)(Code)
Returns the number of days difference between t1 and t2.
Parameters:
  t1 - Time 1
Parameters:
  t2 - Time 2 Number of days between start and end



getEndOfMonth
public static long getEndOfMonth(long date)(Code)
Returns the date corresponding to the end of the month.
Parameters:
  date - Base date End of month.



getNextDay
public static long getNextDay(long date, int startOfWeek)(Code)
Returns the first day after date that has the day of week matching startOfWeek. For example, if you want to find the next monday relative to date you would call getPreviousDay(date, Calendar.MONDAY).
Parameters:
  date - Base date
Parameters:
  startOfWeek - Calendar constant correspoding to start of week. start of week, return value will have 0 hours, 0 minutes,0 seconds and 0 ms.



getNextMonth
public static long getNextMonth(long date)(Code)
Returns the next month.
Parameters:
  date - Base date next month



getPreviousDay
public static long getPreviousDay(long date, int startOfWeek)(Code)
Returns the first day before date that has the day of week matching startOfWeek. For example, if you want to find the previous monday relative to date you would call getPreviousDay(date, Calendar.MONDAY).
Parameters:
  date - Base date
Parameters:
  startOfWeek - Calendar constant correspoding to start of week. start of week, return value will have 0 hours, 0 minutes,0 seconds and 0 ms.



getPreviousMonth
public static long getPreviousMonth(long date)(Code)
Returns the previous month.
Parameters:
  date - Base date previous month



getStartOfMonth
public static long getStartOfMonth(long date)(Code)
Returns the date corresponding to the start of the month.
Parameters:
  date - Base date Start of month.



isFirstOfMonth
public static boolean isFirstOfMonth(long date)(Code)



isFirstOfYear
public static boolean isFirstOfYear(long date)(Code)



nextDay
public static Date nextDay(Date date)(Code)
Returns the day after date.
Parameters:
  date - Date used in calculating next day Day after date.



nextDay
public static long nextDay(long date)(Code)
Returns the day after date.
Parameters:
  date - Date used in calculating next day Day after date.



nextWeek
public static long nextWeek(long date)(Code)
Returns the week after date.
Parameters:
  date - Date used in calculating next week week after date.



previousDay
public static long previousDay(long date)(Code)
Returns the day before date.
Parameters:
  date - Date used in calculating previous day Day before date.



previousWeek
public static long previousWeek(long date)(Code)
Returns the week before date.
Parameters:
  date - Date used in calculating previous week week before date.



startOfDay
public static Date startOfDay(Date date)(Code)
Returns a new Date with the hours, milliseconds, seconds and minutes set to 0.
Parameters:
  date - Date used in calculating start of day Start of date



startOfDayInMillis
public static long startOfDayInMillis(long date)(Code)
Returns day in millis with the hours, milliseconds, seconds and minutes set to 0.
Parameters:
  date - long used in calculating start of day Start of date



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.