Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #412685

Re: Tiny "algorithm" challenge

From owl <owl@rooftop.invalid>
Newsgroups comp.os.linux.advocacy
Subject Re: Tiny "algorithm" challenge
Date 2017-05-03 13:37 +0000
Organization O.W.L.
Message-ID <xcv903.yyah@rooftop.invalid> (permalink)
References <oeclh3$tll$4@dont-email.me>

Show all headers | View raw


DFS <nospam@dfs.com> wrote:
> * if the value entered on screen isn't a Sunday, get the date of the
>   next/upcoming Sunday.
> 
> My 1-line VB solution using immediate if:
> 
> reportDt = IIf(Weekday(screenDt) > 1, screenDt + (7 - Weekday(screenDt) 
> + 1), screenDt)
> 
> 
> The VB Weekday() function by default returns 1 for Sunday, 2 for Monday, 
> etc.
> 
> 
> Beat it or be pwned.

anon@lowtide:~$ date -d Sunday
Sun May  7 00:00:00 EDT 2017
anon@lowtide:~$ 

Back to comp.os.linux.advocacy | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 09:24 -0400
  Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 13:37 +0000
    Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 09:53 -0400
      Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 14:16 +0000
        Re: Tiny "algorithm" challenge chrisv <chrisv@nospam.invalid> - 2017-05-03 10:18 -0500
      Re: Tiny "algorithm" challenge Incubus <incubus9536612@gmail.com> - 2017-05-03 07:34 -0700
        Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 11:33 -0400
        Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 16:57 +0000
      Re: Tiny "algorithm" challenge Sandman <mr@sandman.net> - 2017-05-03 16:25 +0000
        Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 20:34 -0400
      Re: Tiny "algorithm" challenge Snit <usenet@gallopinginsanity.com> - 2017-05-03 10:41 -0700

csiph-web