No announcement yet.

Moon routine changes?

  • Filter
  • Time
  • Show
Clear All
new posts

    Moon routine changes?

    I am slowly converting from HS2 to HS3 with generally fair success. However, I have one routine that is eluding me. I have a routine that sends out warnings the day before a full moon (we are in healthcare - people REALLY DO act weirder during a full moon!). Anyway, the routine is simple, but I can't get it to behave in HS3. The filetype is .vb and it is triggered at 06:00 daily. I added a couple of trace messages - the first correctly displays todays date (variable ds), the second displays the next full moon as "01/01/0001" and the current phase as 0. This routine worked under HS2 and seems to be consistent with the HS3 documentation. If anyone sees what I am missing, I would appreciate it.

    Sub Main (parm as object)
        Dim ds as Date = Date.Now
        Dim NM as Date
        Dim FM as Date
        Dim CurCycle as Integer 
        Dim sDesc as String = ""
        Dim msg as String
        hs.WriteLog("Moon", "Today is " & ds.ToShortDateString)
        hs.Moon(ds, NM, FM, CurCycle, sDesc)
        hs.WriteLog("Moon","Full moon on " & FM.ToShortDateString & _
            ", Cycle is " & CurCycle.ToString)
        If CurCycle = 14 Then
            hs.WriteLog ("Info", "Moon is full tomorrow")
            msg = "Warning: tomorrow is a full moon - please take the necessary precautions"
            hs.SendEmail (", "", "Full Moon Pending", msg)
        End IF
    End Sub
    Last edited by GPrade; January 10, 2014, 09:07 AM.

    Sample from help file fails - bug?

    I pasted the sample straight from the Help file - it also fails. I assume this is a bug?

    Sub Main(parm as object)
        Dim dtStart as Date = Now
       Dim NMoon as Date
       Dim FMoon as Date
       Dim CurCycle as Integer
       Dim sDesc as String = ""
            hs.Moon(dtStart, NMoon, FMoon, CurCycle, sDesc)
           hs.WriteLog("Moon","New on " & NMoon.ToShortDateString & ", Full on " & FMoon.ToShortDateString & _
                             ", Cycle is " & CurCycle.ToString & " = " & sDesc)
    End Sub


      It appears to be a bug. Please put in a Bugzilla ticket on this issue.


        Bug report submitted