status

statusbar program for dwm
git clone anongit@rnpnr.xyz:status.git
Log | Files | Refs | Feed | README | LICENSE

date.c (214B)


      1 /* See LICENSE for license details. */
      2 static size_t
      3 date(struct Block *b)
      4 {
      5 	time_t t = time(NULL);
      6 	strftime(buf, sizeof(buf), b->arg, localtime(&t));
      7 
      8 	return snprintf(b->curstr, LEN(b->curstr), b->fmt, buf);
      9 }