You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Nathan Silberman (JIRA)" <ji...@apache.org> on 2007/08/01 18:50:53 UTC
[jira] Created: (LANG-350) New RandomDateUtils class in the
lang.time package
New RandomDateUtils class in the lang.time package
--------------------------------------------------
Key: LANG-350
URL: https://issues.apache.org/jira/browse/LANG-350
Project: Commons Lang
Issue Type: New Feature
Affects Versions: 2.3
Reporter: Nathan Silberman
Priority: Minor
A new RandomDateUtils class that would provide methods for returning random datetimes and random simple dates. Its functionality would include but not limited to the following:
/*
* Random datetime after Janurary 1st, 1970
*/
public static Date randomDate();
/*
* A Random datetime after the given date
*/
public static Date randomDateAfter( Date date );
/*
* A Random datetime before the given date
*/
public static Date randomDateBefore( Date date );
/*
* Random datetime after this instant
*/
public static Date randomFutureDate();
/*
* Random datetime before this instant
*/
public static Date randomPastDate();
/*
* Random date (zeroed out time) after Janurary 1st, 1970
*/
public static Date randomSimpleDate();
/*
* A Random date (zeroed out time) after the given date
*/
public static Date randomSimpleDateAfter( Date date );
/*
* A Random date (zeroed out time) before the given date
*/
public static Date randomSimpleDateBefore( Date date );
/*
* Random date (zeroed out time) after this instant
*/
public static Date randomSimpleFutureDate();
/*
* Random date (zeroed out time) before this instant
*/
public static Date randomSimplePastDate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[jira] Commented: (LANG-350) New RandomDateUtils class in the
lang.time package
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517062 ]
Henri Yandell commented on LANG-350:
------------------------------------
Apart from changing RandomSimpleDate to RandomDateAtMidnight, I'm +1 on the idea. Anyone feel like submitting a patch + unit test?
> New RandomDateUtils class in the lang.time package
> --------------------------------------------------
>
> Key: LANG-350
> URL: https://issues.apache.org/jira/browse/LANG-350
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Reporter: Nathan Silberman
> Priority: Minor
> Fix For: 3.0
>
>
> A new RandomDateUtils class that would provide methods for returning random datetimes and random simple dates. Its functionality would include but not limited to the following:
> /*
> * Random datetime after Janurary 1st, 1970
> */
> public static Date randomDate();
> /*
> * A Random datetime after the given date
> */
> public static Date randomDateAfter( Date date );
> /*
> * A Random datetime before the given date
> */
> public static Date randomDateBefore( Date date );
> /*
> * Random datetime after this instant
> */
> public static Date randomFutureDate();
> /*
> * Random datetime before this instant
> */
> public static Date randomPastDate();
> /*
> * Random date (zeroed out time) after Janurary 1st, 1970
> */
> public static Date randomSimpleDate();
> /*
> * A Random date (zeroed out time) after the given date
> */
> public static Date randomSimpleDateAfter( Date date );
> /*
> * A Random date (zeroed out time) before the given date
> */
> public static Date randomSimpleDateBefore( Date date );
> /*
> * Random date (zeroed out time) after this instant
> */
> public static Date randomSimpleFutureDate();
> /*
> * Random date (zeroed out time) before this instant
> */
> public static Date randomSimplePastDate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[jira] Updated: (LANG-350) New RandomDateUtils class in the
lang.time package
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated LANG-350:
-------------------------------
Fix Version/s: 3.0
> New RandomDateUtils class in the lang.time package
> --------------------------------------------------
>
> Key: LANG-350
> URL: https://issues.apache.org/jira/browse/LANG-350
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Reporter: Nathan Silberman
> Priority: Minor
> Fix For: 3.0
>
>
> A new RandomDateUtils class that would provide methods for returning random datetimes and random simple dates. Its functionality would include but not limited to the following:
> /*
> * Random datetime after Janurary 1st, 1970
> */
> public static Date randomDate();
> /*
> * A Random datetime after the given date
> */
> public static Date randomDateAfter( Date date );
> /*
> * A Random datetime before the given date
> */
> public static Date randomDateBefore( Date date );
> /*
> * Random datetime after this instant
> */
> public static Date randomFutureDate();
> /*
> * Random datetime before this instant
> */
> public static Date randomPastDate();
> /*
> * Random date (zeroed out time) after Janurary 1st, 1970
> */
> public static Date randomSimpleDate();
> /*
> * A Random date (zeroed out time) after the given date
> */
> public static Date randomSimpleDateAfter( Date date );
> /*
> * A Random date (zeroed out time) before the given date
> */
> public static Date randomSimpleDateBefore( Date date );
> /*
> * Random date (zeroed out time) after this instant
> */
> public static Date randomSimpleFutureDate();
> /*
> * Random date (zeroed out time) before this instant
> */
> public static Date randomSimplePastDate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[jira] Commented: (LANG-350) New RandomDateUtils class in the
lang.time package
Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517099 ]
Gary Gregory commented on LANG-350:
-----------------------------------
As usual with date and time issues, I'd like to suggest we proposing this addition for Joda-Time instead.
> New RandomDateUtils class in the lang.time package
> --------------------------------------------------
>
> Key: LANG-350
> URL: https://issues.apache.org/jira/browse/LANG-350
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Reporter: Nathan Silberman
> Priority: Minor
> Fix For: 3.0
>
>
> A new RandomDateUtils class that would provide methods for returning random datetimes and random simple dates. Its functionality would include but not limited to the following:
> /*
> * Random datetime after Janurary 1st, 1970
> */
> public static Date randomDate();
> /*
> * A Random datetime after the given date
> */
> public static Date randomDateAfter( Date date );
> /*
> * A Random datetime before the given date
> */
> public static Date randomDateBefore( Date date );
> /*
> * Random datetime after this instant
> */
> public static Date randomFutureDate();
> /*
> * Random datetime before this instant
> */
> public static Date randomPastDate();
> /*
> * Random date (zeroed out time) after Janurary 1st, 1970
> */
> public static Date randomSimpleDate();
> /*
> * A Random date (zeroed out time) after the given date
> */
> public static Date randomSimpleDateAfter( Date date );
> /*
> * A Random date (zeroed out time) before the given date
> */
> public static Date randomSimpleDateBefore( Date date );
> /*
> * Random date (zeroed out time) after this instant
> */
> public static Date randomSimpleFutureDate();
> /*
> * Random date (zeroed out time) before this instant
> */
> public static Date randomSimplePastDate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[jira] Commented: (LANG-350) New RandomDateUtils class in the
lang.time package
Posted by "Sergey Vladimirov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517022 ]
Sergey Vladimirov commented on LANG-350:
----------------------------------------
Personally i don't see much sense in randomBefore or randomAfter functions. The only functions with sense for me are:
randomDate(Date start, Day end);
randomSimpleDate(Date start, Date end);
randomFutureDate(Date before);
randomPastDate(Date after);
> New RandomDateUtils class in the lang.time package
> --------------------------------------------------
>
> Key: LANG-350
> URL: https://issues.apache.org/jira/browse/LANG-350
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.3
> Reporter: Nathan Silberman
> Priority: Minor
>
> A new RandomDateUtils class that would provide methods for returning random datetimes and random simple dates. Its functionality would include but not limited to the following:
> /*
> * Random datetime after Janurary 1st, 1970
> */
> public static Date randomDate();
> /*
> * A Random datetime after the given date
> */
> public static Date randomDateAfter( Date date );
> /*
> * A Random datetime before the given date
> */
> public static Date randomDateBefore( Date date );
> /*
> * Random datetime after this instant
> */
> public static Date randomFutureDate();
> /*
> * Random datetime before this instant
> */
> public static Date randomPastDate();
> /*
> * Random date (zeroed out time) after Janurary 1st, 1970
> */
> public static Date randomSimpleDate();
> /*
> * A Random date (zeroed out time) after the given date
> */
> public static Date randomSimpleDateAfter( Date date );
> /*
> * A Random date (zeroed out time) before the given date
> */
> public static Date randomSimpleDateBefore( Date date );
> /*
> * Random date (zeroed out time) after this instant
> */
> public static Date randomSimpleFutureDate();
> /*
> * Random date (zeroed out time) before this instant
> */
> public static Date randomSimplePastDate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org