I agree with Cam Spiers that it's better to do it server-side.
Create the format for the date that's easy to compare with in
Javascript, and just stick it in a hidden input field.

On Feb 4, 12:39 pm, Bob O <sngndn...@gmail.com> wrote:
> Can any one point me in the right direction for my issue.
>
> I have a div with a text value pulled in from a database 01/01/2009
>
> Im trying to write a javascript that can take that value and compare
> it against new Date();
>
> $(document).ready(function() {
>   now = new Date();
>   lastActivityDivs = $('td.yui-dt0-col-LastActivity div');
>   lastActivityDivs.each(function() {
>    if ($(this).val() == (now < 14)) {
>    $(this).addClass('.highlight');
>
> }
>   });
> });
>
> i know this isnt correct, but it gives you an idea of what im trying
> to accomplish..
>
> Any help would be great.
>
> Thank you

Reply via email to