| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.10

 

pack_date

#include "sfldate.h"
word
pack_date (long date)

Synopsis

Packs the date into a single unsigned short word. Use this function to store dates when memory space is at a premium. The packed date can be used correctly in comparisons. Returns the packed date. The date must be later than 31 December 1979.

Source Code - (sfldate.c)

{
    return (word) (((GET_CCYEAR (date) - 1980) << 9) +
                    (GET_MONTH  (date) << 5) +
                     GET_DAY    (date));
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation