Jaa


ExtendedFormat Class

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Represents the extended format for the cache.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Caching.Expirations
Assembly:  Microsoft.Practices.EnterpriseLibrary.Caching (in Microsoft.Practices.EnterpriseLibrary.Caching.dll)

Syntax

'Declaration
PublicClassExtendedFormat
publicclassExtendedFormat
publicref classExtendedFormat
publicclass ExtendedFormat

Remarks

Extended format syntax :

Minute - 0-59
Hour - 0-23
Day of month - 1-31
Month - 1-12
Day of week - 0-6 (Sunday is 0)
Wildcards - * means run every
Examples:
* * * * * - expires every minute
5 * * * * - expire 5th minute of every hour
* 21 * * * - expire every minute of the 21st hour of every day
31 15 * * * - expire 3:31 PM every day
7 4 * * 6 - expire Saturday 4:07 AM
15 21 4 7 * - expire 9:15 PM on 4 July
Therefore 6 6 6 6 1 means: • have we crossed/entered the 6th minute AND • have we crossed/entered the 6th hour AND • have we crossed/entered the 6th day AND • have we crossed/entered the 6th month AND • have we crossed/entered A MONDAY? Therefore these cases should exhibit these behaviors: getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/07/2003 07:07:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime ); TRUE, ALL CROSSED/ENTERED getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/07/2003 07:07:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime ); TRUE getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 *", getTime, nowTime ); TRUE getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime ); TRUE getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2005 05:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime ); TRUE getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2003 05:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime ); FALSE: we did not cross 6th hour, nor did we cross Monday getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime ); TRUE, we cross/enter Friday getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" ); nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" ); isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime ); FALSE: we don’t cross Monday but all other conditions satisfied

Inheritance Hierarchy

System.Object
  Microsoft.Practices.EnterpriseLibrary.Caching.Expirations.ExtendedFormat

See Also

ExtendedFormat Members

Microsoft.Practices.EnterpriseLibrary.Caching.Expirations Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.