//--------------------------------------------------------------------------------- // &V[mydate] is a given date in external format like dd.mm.yyyy or mm/dd/yyyy //--------------------------------------------------------------------------------- // GuiXT uses the following rules for handling dates in computations, or comparisons with < or >: // // (1) A date in one of the 6 external date formats is automatically converted to an absolute number // of days, before doing the calculation or comparison // // (2) If one adds or subtracts a number to/from a date, the result is formatted as a date again, using the // same date format as the given date // Get date in format dd.mm.yyyy, to avoid handling all different date formats Set V[reldate] "&V[mydate]" - "01.01.1000" Set V[date] "01.01.1000" + "&V[reldate]" call "DATE_GET_WEEK" In.DATE="&V[date](7-10)&V[date](4-5)&V[date](1-2)" Out.WEEK="yearweek" Set V[year] "&V[yearweek](1-4)" Set V[week] "&V[yearweek](5-6)" //--------------------------------------------------------------------------------- // &V[year] &V[week] // are now the year and week corresponding to the given date &V[mydate] //---------------------------------------------------------------------------------