Re: perlfaq4: How do I find the week-of-the-year/day-of-the-year?

[email protected] (Smylers)
Newsgroups perl.perlfaq.workers,perl.documentation
Message-ID <[email protected]>
_brian_d_foy wrote:

> +The localtime function returns the day of the week.  Without an
> +argument localtime returns the current seconds since the epoch.
>  
> +    $day_of_year = (localtime)[7];

That second "returns" could be confusing, possibly apparently
contradicting the first one.  Replacing it with "assumes" may help.

But do epoch seconds need mentioning at all here?  Would this do:

  Without an argument localtime assumes the current time.

Smylers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.