This document is provided on an "AS IS" basis without warranties of any kind. Smartsite iXperion class libraries may change in future releases.
Represents the extended format for the cache.
Namespace: Smartsite.Tools.Caching.Expirations
Assembly: Smartsite.Tools (in Smartsite.Tools.dll)
Syntax
C# | Copy Code |
---|---|
public class ExtendedFormat |
Visual Basic (Declaration) | Copy Code |
---|---|
Public Class ExtendedFormat |
Remarks
Extended format syntax :
Examples:
Therefore 6 6 6 6 1 means:
Therefore these cases should exhibit these behaviors:
Result: TRUE, ALL CROSSED/ENTERED
Result: TRUE
Result: TRUE
Result: TRUE
Result: TRUE
Result: FALSE, we did not cross 6th hour, nor did we cross Monday
Result: TRUE, we cross/enter Friday
Result: FALSE, we don't cross Monday but all other conditions satisfied
- 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:
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
C# | Copy Code |
---|---|
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 ); |
Inheritance Hierarchy
See Also
ExtendedFormat Members
Smartsite.Tools.Caching.Expirations Namespace