nstcl  >  Documentation  >  nstcl-time  >  first_day_of_month

Tcl Powered!

first_day_of_month

NAME

first_day_of_month — Returns the first day of a month

SYNOPSIS

package require nstcl-time ?1.0.1?
package require nstcl ?1.0?

::nstcl::first_day_of_month ?-format format? date

DESCRIPTION

Returns the (trivial) first date of the month containing the given date. The format of date can be anything that [clock scan] can parse.

This function is mostly for symetry with last_day_of_month, first_day_of_week, and last_day_of_week.

OPTIONAL SWITCH

-format (defaults to %Y-%m-%d)
Specifies the format that the first date of the month should be returned in. Consult the documentation for the [clock format] command for a list of valid field descriptors.

KEYWORDS

nstcl, time