Java Doc for serverDate.java in  » Search-Engine » yacy » de » anomic » server » 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 » Search Engine » yacy » de.anomic.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.anomic.server.serverDate

serverDate
final public class serverDate (Code)


Field Summary
public static  SimpleDateFormat[]FORMATS_HTTP
     RFC 2616 requires that HTTP clients are able to parse all 3 different formats.
final public static  SimpleDateFormatFORMAT_ISO8601
    
final public static  SimpleDateFormatFORMAT_RFC1123
    
final public static  SimpleDateFormatFORMAT_SHORT_DAY
    
final public static  SimpleDateFormatFORMAT_SHORT_MILSEC
    
final public static  SimpleDateFormatFORMAT_SHORT_SECOND
    
final public static  StringPATTERN_ANSIC
    
final public static  StringPATTERN_ISO8601
    
final public static  StringPATTERN_RFC1036
    
final public static  StringPATTERN_RFC1123
    
final public static  StringPATTERN_SHORT_DAY
    
final public static  StringPATTERN_SHORT_MILSEC
    
final public static  StringPATTERN_SHORT_SECOND
    
final public static  longdayMillis
    
final public static  int[]dimleap
    
final public static  int[]dimnormal
    
final public static  longhourMillis
    
final public static  intjanuarynormalfebruaryleapfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecember
    
final public static  longleapyearMillis
    
final public static  longminuteMillis
    
final public static  longnormalyearMillis
    
final public static  longsecondMillis
    
final public static  String[]wkday
    

Constructor Summary
public  serverDate()
    
public  serverDate(long utime)
    
public  serverDate(String datestring)
    

Method Summary
public static  longUTCDiff()
    
public static  longUTCDiff(String diffString)
    
public static  StringUTCDiffString()
    
public static  longcorrectedUTCTime()
    
public static  StringformatISO8601(Date date)
     Creates a String representation of a Date using the format defined in ISO8601/W3C datetime The result will be in UTC/GMT, e.g.
public static  StringformatInterval(long millis)
    
public static  StringformatShortDay()
     Note: The short day format doesn't include any timezone information.
public static  StringformatShortDay(Date date)
    
public static  StringformatShortDay(Date date, TimeZone tz)
     This should only be used, if you need a short date String that needs to be aligned to a special timezone other than GMT/UTC.
public static  StringformatShortSecond()
     Returns the current date in short second format which is a fixed width (14 chars) String including the date and the time like "20071218233510".
public static  StringformatShortSecond(Date date)
     Identical to serverDate.formatShortDay(Date) , but for short second format.
public static  StringformatShortSecond(Date date, TimeZone tz)
     Identical to serverDate.formatShortDay(Date,TimeZone) , but for short second format.
public static  voidmain(String[] args)
    
public static  DateparseHTTPDate(String s)
     Parse a HTTP string representation of a date into a Date instance.
Parameters:
  s - The date String to parse.
public static  DateparseISO8601(String s)
     Parse dates as defined in . This format (also specified in ISO8601) allows different "precisions". The following lower precision versions for the complete date "2007-12-19T10:20:30.567+0300" are allowed:
"2007"
"2007-12"
"2007-12-19"
"2007-12-19T10:20+0300
"2007-12-19T10:20:30+0300
"2007-12-19T10:20:30.567+0300
Additionally a timezone offset of "+0000" can be substituted as "Z".
Parsing is done in a fuzzy way.
public static  DateparseShortDay(String timeString)
     Parse a String representation of a Date in short day format assuming the date is aligned to the GMT/UTC timezone.
public static  DateparseShortSecond(String timeString)
     Like serverDate.parseShortDay(String) , but for the "short second" format which is short date plus a 6 digit day time value, like "20071218233510".
public static  DateparseShortSecond(String remoteTimeString, String remoteUTCOffset)
     Like serverDate.parseShortSecond(String) using additional timezone information provided in an offset String, like "+0100" for CET.
public static  longremainingTime(long start, long due, long minimum)
    
public  StringtoShortString(boolean millis)
    
public  StringtoString()
    

Field Detail
FORMATS_HTTP
public static SimpleDateFormat[] FORMATS_HTTP(Code)
RFC 2616 requires that HTTP clients are able to parse all 3 different formats. All times MUST be in GMT/UTC, but ...



FORMAT_ISO8601
final public static SimpleDateFormat FORMAT_ISO8601(Code)
Date formatter/non-sloppy parser for W3C datetime (ISO8601) in GMT/UTC



FORMAT_RFC1123
final public static SimpleDateFormat FORMAT_RFC1123(Code)
Date formatter/parser for standard compliant HTTP header dates (RFC 1123)



FORMAT_SHORT_DAY
final public static SimpleDateFormat FORMAT_SHORT_DAY(Code)
Date formatter/parser for minimal yyyyMMdd pattern



FORMAT_SHORT_MILSEC
final public static SimpleDateFormat FORMAT_SHORT_MILSEC(Code)
Date formatter/parser for minimal yyyyMMddHHmmssSSS pattern



FORMAT_SHORT_SECOND
final public static SimpleDateFormat FORMAT_SHORT_SECOND(Code)
Date formatter/parser for minimal yyyyMMddHHmmss pattern



PATTERN_ANSIC
final public static String PATTERN_ANSIC(Code)
date pattern used in older HTTP implementations



PATTERN_ISO8601
final public static String PATTERN_ISO8601(Code)
pattern for a W3C datetime variant of a non-localized ISO8601 date



PATTERN_RFC1036
final public static String PATTERN_RFC1036(Code)
date pattern used in older HTTP implementations



PATTERN_RFC1123
final public static String PATTERN_RFC1123(Code)
default HTTP 1.1 header date format pattern



PATTERN_SHORT_DAY
final public static String PATTERN_SHORT_DAY(Code)
minimal date format without time information (fixed width: 8)



PATTERN_SHORT_MILSEC
final public static String PATTERN_SHORT_MILSEC(Code)
minimal date format including milliseconds (fixed width: 17)



PATTERN_SHORT_SECOND
final public static String PATTERN_SHORT_SECOND(Code)
minimal date format (fixed width: 14)



dayMillis
final public static long dayMillis(Code)



dimleap
final public static int[] dimleap(Code)



dimnormal
final public static int[] dimnormal(Code)



hourMillis
final public static long hourMillis(Code)



januarynormalfebruaryleapfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecember
final public static int januarynormalfebruaryleapfebruarymarchaprilmayjunejulyaugustseptemberoctobernovemberdecember(Code)



leapyearMillis
final public static long leapyearMillis(Code)



minuteMillis
final public static long minuteMillis(Code)



normalyearMillis
final public static long normalyearMillis(Code)



secondMillis
final public static long secondMillis(Code)



wkday
final public static String[] wkday(Code)




Constructor Detail
serverDate
public serverDate()(Code)



serverDate
public serverDate(long utime)(Code)



serverDate
public serverDate(String datestring) throws java.text.ParseException(Code)




Method Detail
UTCDiff
public static long UTCDiff()(Code)



UTCDiff
public static long UTCDiff(String diffString)(Code)



UTCDiffString
public static String UTCDiffString()(Code)



correctedUTCTime
public static long correctedUTCTime()(Code)



formatISO8601
public static String formatISO8601(Date date)(Code)
Creates a String representation of a Date using the format defined in ISO8601/W3C datetime The result will be in UTC/GMT, e.g. "2007-12-19T10:20:30Z".
Parameters:
  date - The Date instance to transform. A fixed width (20 chars) ISO8601 date String.



formatInterval
public static String formatInterval(long millis)(Code)
Format a time inteval in milliseconds into a String of the form X 'day'['s'] HH':'mm



formatShortDay
public static String formatShortDay()(Code)
Note: The short day format doesn't include any timezone information. This method transforms the date into the GMT/UTC timezone. Example: If the local system time is, 2007-12-18 01:15:00 +0200, then the resulting String will be "2007-12-17". In case you need a format with a timezon offset, use serverDate.formatShortDay(TimeZone) a String representation of the current system date in GMT using theshort day format, e.g. "20071218".



formatShortDay
public static String formatShortDay(Date date)(Code)

See Also:   serverDate.formatShortDay()
Parameters:
  date - the Date to transform



formatShortDay
public static String formatShortDay(Date date, TimeZone tz)(Code)
This should only be used, if you need a short date String that needs to be aligned to a special timezone other than GMT/UTC. Be aware that a receiver won't be able to recreate the original Date without additional timezone information.
See Also:   serverDate.formatShortDay()
Parameters:
  date - the Date to transform
Parameters:
  tz - a TimeZone the resulting date String should be aligned to.



formatShortSecond
public static String formatShortSecond()(Code)
Returns the current date in short second format which is a fixed width (14 chars) String including the date and the time like "20071218233510". The result is in GMT/UTC.
See Also:   serverDate.formatShortDay()



formatShortSecond
public static String formatShortSecond(Date date)(Code)
Identical to serverDate.formatShortDay(Date) , but for short second format.



formatShortSecond
public static String formatShortSecond(Date date, TimeZone tz)(Code)
Identical to serverDate.formatShortDay(Date,TimeZone) , but for short second format.



main
public static void main(String[] args)(Code)



parseHTTPDate
public static Date parseHTTPDate(String s)(Code)
Parse a HTTP string representation of a date into a Date instance.
Parameters:
  s - The date String to parse. The Date instance if successful, null otherwise.



parseISO8601
public static Date parseISO8601(String s) throws ParseException(Code)
Parse dates as defined in . This format (also specified in ISO8601) allows different "precisions". The following lower precision versions for the complete date "2007-12-19T10:20:30.567+0300" are allowed:
"2007"
"2007-12"
"2007-12-19"
"2007-12-19T10:20+0300
"2007-12-19T10:20:30+0300
"2007-12-19T10:20:30.567+0300
Additionally a timezone offset of "+0000" can be substituted as "Z".
Parsing is done in a fuzzy way. If there is an illegal character somewhere in the String, the date parsed so far will be returned, e.g. the input "2007-12-19FOO" would return a date that represents "2007-12-19".
Parameters:
  s -
throws:
  ParseException -



parseShortDay
public static Date parseShortDay(String timeString) throws ParseException(Code)
Parse a String representation of a Date in short day format assuming the date is aligned to the GMT/UTC timezone. An example for such a date string is "20071218".
See Also:   serverDate.formatShortDay()
throws:
  ParseException - The exception is thrown if an error occured during while parsingthe String.



parseShortSecond
public static Date parseShortSecond(String timeString) throws ParseException(Code)
Like serverDate.parseShortDay(String) , but for the "short second" format which is short date plus a 6 digit day time value, like "20071218233510". The String should be in GMT/UTC to get a correct Date.



parseShortSecond
public static Date parseShortSecond(String remoteTimeString, String remoteUTCOffset)(Code)
Like serverDate.parseShortSecond(String) using additional timezone information provided in an offset String, like "+0100" for CET.



remainingTime
public static long remainingTime(long start, long due, long minimum)(Code)



toShortString
public String toShortString(boolean millis)(Code)



toString
public String toString()(Code)



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.