~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/dayofyear.cc

  • Committer: Brian Aker
  • Date: 2009-07-16 22:37:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1100.
  • Revision ID: brian@gaz-20090716223701-vbbbo8dmgd2ljqqo
Refactor TableShare has to be behind class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include "drizzled/server_includes.h"
 
21
#include CSTDINT_H
21
22
#include "drizzled/temporal.h"
22
23
#include "drizzled/error.h"
23
24
#include "drizzled/calendar.h"
24
25
#include "drizzled/function/time/dayofyear.h"
25
 
#include "drizzled/internal/my_sys.h"
26
 
 
27
 
namespace drizzled
28
 
{
29
26
 
30
27
int64_t Item_func_dayofyear::val_int()
31
28
{
39
36
  }
40
37
 
41
38
  /* Grab the first argument as a DateTime object */
42
 
  DateTime temporal;
 
39
  drizzled::DateTime temporal;
43
40
  Item_result arg0_result_type= args[0]->result_type();
44
41
  
45
42
  switch (arg0_result_type)
93
90
  return (int64_t) julian_day_number_from_gregorian_date(temporal.years(), temporal.months(), temporal.days())
94
91
                 - julian_day_number_from_gregorian_date(temporal.years(), 1, 1) + 1;
95
92
}
96
 
 
97
 
} /* namespace drizzled */