/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* Time_t conversion support
*/
#include <tmx.h>
{
{ 7, 6, 6 },
{ 1, 7, 7 },
{ 2, 1, 8 },
{ 3, 2, 9 },
{ 4, 3, 10},
{ 5, 4, 4 },
{ 6, 5, 5 },
};
/*
* type is week type
* 0 sunday first day of week
* 1 monday first day of week
* 2 monday first day of iso week
* if week<0 then return week for tm
* if day<0 then set tm to first day of week
* otherwise set tm to day in week
* and return tm->tm_yday
*/
int
{
int d;
if (week < 0)
{
day += 7;
if (type == 2)
{
if (!week)
week = 1;
}
return week;
}
if (day < 0)
{
}
}