[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Date, Time, Minivend, Perl Question
****** message to minivend-users from "Bill Randle" <billr@exgate.tek.com> ******
On Jul 21, 4:31pm, Stefan Hornburg wrote:
} Subject: Re: [mv] Date, Time, Minivend, Perl Question
}
} Steve & Patti Getzinger <steveandpatti@wubs.org> writes:
} >
} > I am trying to write an [if] for MV 4.03 and so far am stumped. Both
halves work
} > fine by themselves so I am thinking operator problem. I have tried may
configs
} > utilizing ( ) here and there but always come up empty when I try both
together. It
} > must meet both conditions. Actually there are 3 conditions and when I can
get past
} > this I am sure the third will be a no brainer to put in place. Here is my
basic tag
} >
} > [if (`date` =~ /^S/) && (localtime($hours) => 7)]
} > R
} > [/if]
}
} MV isn't a programming language like perl, read the docs more thoroughly.
} For your task, try embedded perl.
}
} Ciao
} Racke
}
Here's a possible, though untested, way:
[if type=explicit compare="[calc]
return 0 if (localtime)[2] < 7;
return 0 if (localtime)[6] < 1 || (localtime)[6] > 5;
return 1;
[/calc]"]
R
[/if]
-Bill
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list