What more do I have to do?


14/10/04
 

What more do I have to do?

Let's see . . . I now have these working:
  1. function CreateFreshExpiryDataFile
  2. function AppendExpiryDataToFile
  3. some code to parse the ExpiryData.xml file.
I feel it's time to re-visit and refine my previous pseudo-code - here is my refined 2nd attempt at a main program. I'm assuming that an empty, formatted ExpiryData.xml file exists at initialisation.
 
Main program pseudo-code (2nd attempt)

Use ConvertExpiryDateToYYMMDD to re-format referring page expiry date
If the referring page has expired then
  If the referring page is a valid LSBU myweb page then
    AppendExpiryDataToFile
    If ((today is a Monday) but (ExpiryData file is pre-today)) then
       EmailExpiryMessages
       Copy ExpiryData.xml to ExpiryDataLastWeek.xml
       CreateFreshExpiryDataFile
    Endif
  Endif
Endif

Notes...

  • bold text represents a function
     
  • in version 1 there were quite a few lines of code devoted to accepting dates in d/m/yy, d/mm/yy, dd/m/yy or dd/mm/yy format and converting these to yymmdd; I'll put these into a self-contained function (ConvertExpiryDateToYYMMDD)
     
  • the function EmailExpiryMessages will, of course, be based on the code I already have that parses the ExpiryData.xml file
     
  • I feel that checking whether 'the referring page is a valid LSBU myweb page' is something that should be in the main program rather than within the AppendExpiryDataToFile function, as it is currently.
 
 
 

<<contents ^top^