[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eDateUtil\u003c/code\u003e is a utility class in Java designed for centralized date processing.\u003c/p\u003e\n"],["\u003cp\u003eIt defines a constant \u003ccode\u003eMILLISECONDS_IN_DAY\u003c/code\u003e to represent the number of milliseconds in a day.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides \u003ccode\u003edeserializeDate\u003c/code\u003e to convert date strings into \u003ccode\u003eDate\u003c/code\u003e objects, supporting "yyyy-MM-dd" and long formats.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eformatDateTime\u003c/code\u003e method formats a \u003ccode\u003eDate\u003c/code\u003e object into an ISO 8601 date-time string for error messages.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eserializeDate\u003c/code\u003e converts a \u003ccode\u003eDate\u003c/code\u003e object into a string representing the milliseconds since the UNIX Epoch.\u003c/p\u003e\n"]]],[],null,["# Class DateUtil (2.0.0)\n\n public final class DateUtil\n\nA utility class that centralizes processing of dates. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e DateUtil \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Fields\n-------------\n\n### MILLISECONDS_IN_DAY\n\n public static final int MILLISECONDS_IN_DAY\n\nThe milliseconds in a day.\n\nStatic Methods\n--------------\n\n### deserializeDate(String date)\n\n public static Date deserializeDate(String date)\n\nConverts a string containing the milliseconds since the UNIX Epoch into a Date.\n\nTwo formats of date string are supported: \"yyyy-MM-dd\" and a long. Eventually,\nthe \"yyyy-MM-dd\" format support will be removed.\n\n### formatDateTime(Date date)\n\n public static String formatDateTime(Date date)\n\nFormats a date according ISO 8601 full date time format. Currently,\nthis is used to print dates for error messages.\n\n### getEpochPlusDays(int days, int milliseconds)\n\n public static final Date getEpochPlusDays(int days, int milliseconds)\n\nConstructs a [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) set to the UNIX Epoch plus days plus milliseconds.\n\n### serializeDate(Date date)\n\n public static String serializeDate(Date date)\n\nConverts date into a string containing the milliseconds since the UNIX Epoch."]]