41#include <libdap/BaseType.h>
42#include <libdap/Str.h>
43#include <libdap/Structure.h>
44#include <libdap/Sequence.h>
45#include <libdap/DDS.h>
46#include <libdap/ConstraintEvaluator.h>
47#include <libdap/ServerFunctionsList.h>
48#include <libdap/Error.h>
49#include <libdap/util.h>
50#include <libdap/debug.h>
54#include "DODS_Date_Factory.h"
55#include "DODS_StartDate_Factory.h"
56#include "DODS_EndDate_Factory.h"
58#include "DODS_Time_Factory.h"
59#include "DODS_StartTime_Factory.h"
60#include "DODS_EndTime_Factory.h"
61#include "DODS_Date_Time.h"
62#include "DODS_Date_Time_Factory.h"
63#include "DODS_StartDate_Time_Factory.h"
64#include "DODS_EndDate_Time_Factory.h"
66#include "ff_ce_functions.h"
74template <
class T,
class T_Factory >
75inline static T get_instance(DDS & dds)
77 return T_Factory(dds).get();
93template <
class T,
class T_Factory >
94static bool comparison(
int argc, BaseType * argv[], DDS & dds)
96 if (argc < 1 || argc > 2)
97 throw Error(malformed_expr,
98 "Wrong number of arguments to a constraint expression function.");
100 DBG(cerr <<
"comparision: argc: " << argc << endl);
107 T current = get_instance < T, T_Factory > (dds);
109 DBG(cerr <<
"t1: " << t1.get(iso8601) << endl);
111 DBG(cerr <<
"t2 (1): " << t2.get(iso8601) << endl);
113 DBG(cerr <<
"current: " << current.get(iso8601) << endl);
116 return ((t1 <= current) && (t2 >= current));
118 return (t1 == current);
134template <
class T1,
class T1_Factory,
class T2,
class T2_Factory >
135 static bool range_comparison(
int argc, BaseType * argv[], DDS & dds)
138 throw Error(malformed_expr,
139 "Wrong number of arguments to a constraint expression function.");
144 T1 current_start = get_instance < T1, T1_Factory > (dds);
145 T2 current_end = get_instance < T2, T2_Factory > (dds);
147 return (((current_start >= t1) && (current_start <= t2)) ||
148 ((current_end >= t1) && (current_end <= t2)) ||
149 ((current_start <= t1) && (current_end >= t2)));
161new_string_variable(
const string & name, DDS & dds, BaseType * position = 0)
165 Str *new_variable =
new FFStr(name,
"");
166 new_variable->set_read_p(
true);
167 new_variable->set_synthesized_p(
true);
172 switch (position->type()) {
173 case dods_structure_c:{
174 Structure *sp = (Structure *) position;
175 sp->add_var((BaseType *) new_variable);
179 case dods_sequence_c:{
181 sp->add_var((BaseType *) new_variable);
187 throw Error(malformed_expr,
188 "You asked me to insert the synthesized variable in \n\
189something that did not exist or was not a constructor \n\
190type (e.g., a structure, sequence, ...).");
195 dds.add_var(new_variable);
200 dds.mark(name,
true);
205static void func_date(
int argc, BaseType * argv[], DDS & dds,
bool *result)
207 DBG(cerr <<
"calling func_date" << endl);
208 *result = comparison < DODS_Date, DODS_Date_Factory > (argc, argv, dds);
209 DBG(cerr <<
"result: " << *result << endl << endl);
212static void func_startdate(
int argc, BaseType * argv[], DDS & dds,
bool *result)
214 DBG(cerr <<
"calling func_startdate" << endl);
215 *result = comparison < DODS_Date, DODS_StartDate_Factory > (argc, argv,
219static void func_enddate(
int argc, BaseType * argv[], DDS & dds,
bool *result)
221 DBG(cerr <<
"calling func_enddate" << endl);
222 *result = comparison < DODS_Date, DODS_EndDate_Factory > (argc, argv,
226static void func_date_range(
int argc, BaseType * argv[], DDS & dds,
bool *result)
232static void func_time(
int argc, BaseType * argv[], DDS & dds,
bool *result)
234 *result = comparison < DODS_Time, DODS_Time_Factory > (argc, argv, dds);
237static void func_starttime(
int argc, BaseType * argv[], DDS & dds,
bool *result)
239 *result = comparison < DODS_Time, DODS_StartTime_Factory > (argc, argv,
243static void func_endtime(
int argc, BaseType * argv[], DDS & dds,
bool *result)
245 *result = comparison < DODS_Time, DODS_EndTime_Factory > (argc, argv,
251static void func_date_time(
int argc, BaseType * argv[], DDS & dds,
bool *result)
253 *result = comparison < DODS_Date_Time, DODS_Date_Time_Factory > (argc,
258static void func_startdate_time(
int argc, BaseType * argv[], DDS & dds,
bool *result)
264static void func_enddate_time(
int argc, BaseType * argv[], DDS & dds,
bool *result)
266 *result = comparison < DODS_Date_Time, DODS_EndDate_Time_Factory > (argc,
277static void sel_dods_jdate(
int argc, BaseType *[], DDS & dds,
bool *result)
280 throw Error(malformed_expr,
281 "Wrong number of arguments to internal selection function.\n\
282Please report this error.");
285 get_instance < DODS_Date, DODS_Date_Factory > (dds);
288 Str *dods_jdate = (
Str *) dds.var(
"DODS_JDate");
291 string s = current.
get(yd).c_str();
292 dods_jdate->val2buf(&s);
301proj_dods_jdate(
int argc, BaseType * argv[], DDS & dds,
302 ConstraintEvaluator & ce)
304 if (argc < 0 || argc > 1)
305 throw Error(malformed_expr,
306 "Wrong number of arguments to projection function.\n\
307Expected zero or one arguments.");
309 new_string_variable(
"DODS_JDate", dds, (argc == 1) ? argv[0] : 0);
313 ce.append_clause(sel_dods_jdate, 0);
318static void sel_dods_date(
int argc, BaseType *[], DDS & dds,
bool *result)
321 throw Error(malformed_expr,
322 "Wrong number of arguments to internal selection function.\n\
323Please report this error.");
326 get_instance < DODS_Date, DODS_Date_Factory > (dds);
329 Str *dods_date = (
Str *) dds.var(
"DODS_Date");
332 string s = current.
get().c_str();
333 dods_date->val2buf(&s);
339proj_dods_date(
int argc, BaseType * argv[], DDS & dds,
340 ConstraintEvaluator & ce)
342 if (argc < 0 || argc > 1)
343 throw Error(malformed_expr,
344 "Wrong number of arguments to projection function.\n\
345Expected zero or one arguments.");
347 new_string_variable(
"DODS_Date", dds, (argc == 1) ? argv[0] : 0);
351 ce.append_clause(sel_dods_date, 0);
357static void sel_dods_time(
int argc, BaseType *[], DDS & dds,
bool *result)
360 throw Error(malformed_expr,
361 "Wrong number of arguments to internal selection function.\n\
362Please report this error.");
365 get_instance < DODS_Time, DODS_Time_Factory > (dds);
368 Str *dods_time = (
Str *) dds.var(
"DODS_Time");
369 string s = current.
get().c_str();
370 dods_time->val2buf(&s);
376proj_dods_time(
int argc, BaseType * argv[], DDS & dds,
377 ConstraintEvaluator & ce)
379 if (argc < 0 || argc > 1)
380 throw Error(malformed_expr,
381 "Wrong number of arguments to projection function.\n\
382Expected zero or one arguments.");
386 new_string_variable(
"DODS_Time", dds, (argc == 1) ? argv[0] : 0);
390 ce.append_clause(sel_dods_time, 0);
398static void sel_dods_date_time(
int argc, BaseType *[], DDS & dds,
bool *result)
401 throw Error(malformed_expr,
402 "Wrong number of arguments to internal selection function.\n\
403Please report this error.");
406 = get_instance < DODS_Date_Time, DODS_Date_Time_Factory > (dds);
408 Str *dods_date_time = (
Str *) dds.var(
"DODS_Date_Time");
409 string s = current.
get().c_str();
410 dods_date_time->val2buf(&s);
419proj_dods_date_time(
int argc, BaseType * argv[], DDS & dds,
420 ConstraintEvaluator & ce)
422 if (argc < 0 || argc > 1)
423 throw Error(malformed_expr,
424 "Wrong number of arguments to projection function.\n\
425Expected zero or one arguments.");
429 new_string_variable(
"DODS_Date_Time", dds, (argc == 1) ? argv[0] : 0);
433 ce.append_clause(sel_dods_date_time, 0);
441static void sel_dods_decimal_year(
int argc, BaseType *[], DDS & dds,
bool *result)
444 throw Error(malformed_expr,
445 "Wrong number of arguments to internal selection function.\n\
446Please report this error.");
449 = get_instance < DODS_Date_Time, DODS_Date_Time_Factory > (dds);
452 Str *dods_decimal_year = (
Str *) dds.var(
"DODS_Decimal_Year");
453 string s = current.
get(decimal);
454 dods_decimal_year->val2buf(&s);
463proj_dods_decimal_year(
int argc, BaseType * argv[], DDS & dds,
464 ConstraintEvaluator & ce)
466 if (argc < 0 || argc > 1)
467 throw Error(malformed_expr,
468 "Wrong number of arguments to projection function.\n\
469Expected zero or one arguments.");
473 new_string_variable(
"DODS_Decimal_Year", dds,
474 (argc == 1) ? argv[0] : 0);
478 ce.append_clause(sel_dods_decimal_year, 0);
486static void sel_dods_startdecimal_year(
int argc, BaseType *[], DDS & dds,
bool *result)
489 throw Error(malformed_expr,
490 "Wrong number of arguments to internal selection function.\n\
491Please report this error.");
495 get_instance < DODS_Date_Time, DODS_StartDate_Time_Factory > (dds);
498 Str *dods_decimal_year = (
Str *) dds.var(
"DODS_StartDecimal_Year");
499 string s = current.
get(decimal);
500 dods_decimal_year->val2buf(&s);
509proj_dods_startdecimal_year(
int argc, BaseType * argv[], DDS & dds,
510 ConstraintEvaluator & ce)
512 if (argc < 0 || argc > 1)
513 throw Error(malformed_expr,
514 "Wrong number of arguments to projection function.\n\
515Expected zero or one arguments.");
519 new_string_variable(
"DODS_StartDecimal_Year", dds,
520 (argc == 1) ? argv[0] : 0);
524 ce.append_clause(sel_dods_startdecimal_year, 0);
532static void sel_dods_enddecimal_year(
int argc, BaseType *[], DDS & dds,
bool *result)
535 throw Error(malformed_expr,
536 "Wrong number of arguments to internal selection function.\n\
537Please report this error.");
540 = get_instance < DODS_Date_Time, DODS_EndDate_Time_Factory > (dds);
543 Str *dods_decimal_year = (
Str *) dds.var(
"DODS_EndDecimal_Year");
544 string s = current.
get(decimal);
545 dods_decimal_year->val2buf(&s);
554proj_dods_enddecimal_year(
int argc, BaseType * argv[], DDS & dds,
555 ConstraintEvaluator & ce)
557 if (argc < 0 || argc > 1)
558 throw Error(malformed_expr,
559 "Wrong number of arguments to projection function.\n\
560Expected zero or one arguments.");
564 new_string_variable(
"DODS_EndDecimal_Year", dds,
565 (argc == 1) ? argv[0] : 0);
569 ce.append_clause(sel_dods_enddecimal_year, 0);
574static void sel_dods_startdate(
int argc, BaseType *[], DDS & dds,
bool *result)
577 throw Error(malformed_expr,
578 "Wrong number of arguments to internal selection function.\n\
579Please report this error.");
582 get_instance < DODS_Date, DODS_StartDate_Factory > (dds);
585 Str *dods_date = (
Str *) dds.var(
"DODS_StartDate");
588 string s = current.
get().c_str();
589 dods_date->val2buf(&s);
595proj_dods_startdate(
int argc, BaseType * argv[], DDS & dds,
596 ConstraintEvaluator & ce)
598 if (argc < 0 || argc > 1)
599 throw Error(malformed_expr,
600 "Wrong number of arguments to projection function.\n\
601Expected zero or one arguments.");
603 new_string_variable(
"DODS_StartDate", dds, (argc == 1) ? argv[0] : 0);
607 ce.append_clause(sel_dods_startdate, 0);
612static void sel_dods_starttime(
int argc, BaseType *[], DDS & dds,
bool *result)
615 throw Error(malformed_expr,
616 "Wrong number of arguments to internal selection function.\n\
617Please report this error.");
620 get_instance < DODS_Time, DODS_StartTime_Factory > (dds);
623 Str *dods_time = (
Str *) dds.var(
"DODS_StartTime");
624 string s = current.
get().c_str();
625 dods_time->val2buf(&s);
631proj_dods_starttime(
int argc, BaseType * argv[], DDS & dds,
632 ConstraintEvaluator & ce)
634 if (argc < 0 || argc > 1)
635 throw Error(malformed_expr,
636 "Wrong number of arguments to projection function.\n\
637Expected zero or one arguments.");
641 new_string_variable(
"DODS_StartTime", dds, (argc == 1) ? argv[0] : 0);
645 ce.append_clause(sel_dods_starttime, 0);
653static void sel_dods_startdate_time(
int argc, BaseType *[], DDS & dds,
bool *result)
656 throw Error(malformed_expr,
657 "Wrong number of arguments to internal selection function.\n\
658Please report this error.");
662 get_instance < DODS_Date_Time, DODS_StartDate_Time_Factory > (dds);
664 Str *dods_date_time = (
Str *) dds.var(
"DODS_StartDate_Time");
665 string s = current.
get().c_str();
666 dods_date_time->val2buf(&s);
675proj_dods_startdate_time(
int argc, BaseType * argv[], DDS & dds,
676 ConstraintEvaluator & ce)
678 if (argc < 0 || argc > 1)
679 throw Error(malformed_expr,
680 "Wrong number of arguments to projection function.\n\
681Expected zero or one arguments.");
685 new_string_variable(
"DODS_StartDate_Time", dds,
686 (argc == 1) ? argv[0] : 0);
690 ce.append_clause(sel_dods_startdate_time, 0);
695static void sel_dods_enddate(
int argc, BaseType *[], DDS & dds,
bool *result)
698 throw Error(malformed_expr,
699 "Wrong number of arguments to internal selection function.\n\
700Please report this error.");
703 get_instance < DODS_Date, DODS_EndDate_Factory > (dds);
706 Str *dods_date = (
Str *) dds.var(
"DODS_EndDate");
709 string s = current.
get().c_str();
710 dods_date->val2buf(&s);
716proj_dods_enddate(
int argc, BaseType * argv[], DDS & dds,
717 ConstraintEvaluator & ce)
719 if (argc < 0 || argc > 1)
720 throw Error(malformed_expr,
721 "Wrong number of arguments to projection function.\n\
722Expected zero or one arguments.");
724 new_string_variable(
"DODS_EndDate", dds, (argc == 1) ? argv[0] : 0);
728 ce.append_clause(sel_dods_enddate, 0);
733static void sel_dods_endtime(
int argc, BaseType *[], DDS & dds,
bool *result)
736 throw Error(malformed_expr,
737 "Wrong number of arguments to internal selection function.\n\
738Please report this error.");
741 get_instance < DODS_Time, DODS_EndTime_Factory > (dds);
744 Str *dods_time = (
Str *) dds.var(
"DODS_EndTime");
745 string s = current.
get().c_str();
746 dods_time->val2buf(&s);
752proj_dods_endtime(
int argc, BaseType * argv[], DDS & dds,
753 ConstraintEvaluator & ce)
755 if (argc < 0 || argc > 1)
756 throw Error(malformed_expr,
757 "Wrong number of arguments to projection function.\n\
758Expected zero or one arguments.");
762 new_string_variable(
"DODS_EndTime", dds, (argc == 1) ? argv[0] : 0);
766 ce.append_clause(sel_dods_endtime, 0);
774static void sel_dods_enddate_time(
int argc, BaseType *[], DDS & dds,
bool *result)
777 throw Error(malformed_expr,
778 "Wrong number of arguments to internal selection function.\n\
779Please report this error.");
782 = get_instance < DODS_Date_Time, DODS_EndDate_Time_Factory > (dds);
784 Str *dods_date_time = (
Str *) dds.var(
"DODS_EndDate_Time");
785 string s = current.
get().c_str();
786 dods_date_time->val2buf(&s);
795proj_dods_enddate_time(
int argc, BaseType * argv[], DDS & dds,
796 ConstraintEvaluator & ce)
798 if (argc < 0 || argc > 1)
799 throw Error(malformed_expr,
800 "Wrong number of arguments to projection function.\n\
801Expected zero or one arguments.");
805 new_string_variable(
"DODS_EndDate_Time", dds,
806 (argc == 1) ? argv[0] : 0);
810 ce.append_clause(sel_dods_enddate_time, 0);
813void ff_register_functions()
815 libdap::ServerFunction *ff_dap_function;
824 ff_dap_function =
new libdap::ServerFunction(
830 string(
"Compares the current variable to the date parameters. If only one parameter is passed then ") +
831 "this returns true if they're the same date. If two parameters are passed they are considered to be the beginning "+
832 "and end of a date range and the function returns true if the current variable falls in the range.",
834 "date(date_1[, date_2])",
836 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
838 "https://services.opendap.org/dap4/freeform-function/date",
842 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
844 ff_dap_function =
new libdap::ServerFunction(
847 string(
"Compares the current sequence instance with the passed date range. Return true if the instance is within the range. ")+
848 "If only single date parameter is used as a start date to now.",
849 "date_range(startDate, endDate)",
850 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
851 "https://services.opendap.org/dap4/freeform-function/date_range",
854 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
856 ff_dap_function =
new libdap::ServerFunction(
859 string(
"The current sequence instance is compared, as a start date, to the single passed parameter. Returns true if they're the same date. ")+
860 "If two parameters are passed they are considered a date range. True is returned if the current variable falls into the range.",
861 "start_date(date[, endDate])",
862 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
863 "https://services.opendap.org/dap4/freeform-function/start_date",
866 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
868 ff_dap_function =
new libdap::ServerFunction(
871 string(
"The current sequence instance is compared, as an end date, to the single passed parameter. Returns true if they're the same date. ") +
872 "If two parameters are passed they are considered a date range. True is returned if the current variable falls into the range.",
873 "end_date(date[, endDate])",
874 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
875 "https://services.opendap.org/dap4/freeform-function/end_date",
878 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
880 ff_dap_function =
new libdap::ServerFunction(
883 "Compares the current variable with the passed time range. Return true if the sequence instance is within the range.",
884 "time( time[, endTime] )",
885 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
886 "https://services.opendap.org/dap4/freeform-function/time",
889 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
891 ff_dap_function =
new libdap::ServerFunction(
894 "Compares the current variable with the passed time range. Return true if the sequence instance is within the range.",
895 "start_time( time[, endTime] )",
896 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
897 "https://services.opendap.org/dap4/freeform-function/start_time",
900 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
902 ff_dap_function =
new libdap::ServerFunction(
905 "Compares the current variable with the passed time range. Return true if the sequence instance is within the range.",
906 "end_time( time[, endTime] )",
907 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
908 "https://services.opendap.org/dap4/freeform-function/end_time",
911 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
913 ff_dap_function =
new libdap::ServerFunction(
916 "Compares the current sequence instance with the passed date/time range. Return true if the instance is within the range.",
917 "date_time( date/time [, end date/time] )",
918 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
919 "https://services.opendap.org/dap4/freeform-function/date_time",
922 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
924 ff_dap_function =
new libdap::ServerFunction(
927 "Compares the current sequence instance with the passed date/time range. Return true if the instance is within the range.",
928 "start_date_time( date/time [, end date/time] )",
929 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
930 "https://services.opendap.org/dap4/freeform-function/start_date_time",
933 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
935 ff_dap_function =
new libdap::ServerFunction(
938 "Compares the current sequence instance with the passed date/time range. Return true if the instance is within the range.",
939 "end_date_time(date/time [, end date/time] )",
940 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
941 "https://services.opendap.org/dap4/freeform-function/end_date_time",
944 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
951 ff_dap_function =
new libdap::ServerFunction(
954 "Adds a variable named DODS_Time that is an ISO 8601 time string to the dataset.",
955 "DODS_Time( [Sequence or Structure] )",
956 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
957 "https://services.opendap.org/dap4/freeform-function/DODS_Time",
960 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
962 ff_dap_function =
new libdap::ServerFunction(
965 "Adds a variable named DODS_StartTime that is an ISO 8601 time string to the dataset.",
966 "DODS_StartTime( [Sequence or Structure] )",
967 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
968 "https://services.opendap.org/dap4/freeform-function/DODS_StartTime",
971 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
973 ff_dap_function =
new libdap::ServerFunction(
976 "Adds a variable named DODS_EndTime that is an ISO 8601 time string to the dataset.",
977 "DODS_EndTime( [Sequence or Structure] )",
978 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
979 "https://services.opendap.org/dap4/freeform-function/DODS_EndTime",
982 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
984 ff_dap_function =
new libdap::ServerFunction(
987 "Adds a variable named DODS_JDate that is the Julian day number to the dataset.",
988 "DODS_JDate( [Sequence or Structure variable] )",
989 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
990 "https://services.opendap.org/dap4/freeform-function/DODS_JDATE",
993 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
995 ff_dap_function =
new libdap::ServerFunction(
998 string(
"Adds a variable named DODS_Date that is an ISO 8601 date string to the dataset."),
999 "DODS_Date( [Sequence or Structure] )",
1000 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1001 "https://services.opendap.org/dap4/freeform-function/DODS_Date",
1004 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1006 ff_dap_function =
new libdap::ServerFunction(
1009 string(
"Adds a variable named DODS_StartDate that is an ISO 8601 date string to the dataset."),
1010 "DODS_StartDate( [Sequence or Structure] )",
1011 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1012 "https://services.opendap.org/dap4/freeform-function/DODS_StartDate",
1015 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1017 ff_dap_function =
new libdap::ServerFunction(
1020 string(
"Adds a variable named DODS_EndDate that is an ISO 8601 date string to the dataset."),
1021 "DODS_EndDate( [Sequence or Structure] )",
1022 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1023 "https://services.opendap.org/dap4/freeform-function/DODS_EndDate",
1026 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1027 ff_dap_function =
new libdap::ServerFunction(
1030 "Adds a variable named DODS_Date_Time that is an ISO 8601 date/time string to the dataset.",
1031 "DODS_Date_Time( [Sequence or Structure] )",
1032 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1033 "https://services.opendap.org/dap4/freeform-function/DODS_Date_Time",
1036 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1038 ff_dap_function =
new libdap::ServerFunction(
1039 "DODS_StartDate_Time",
1041 "Adds a variable named DODS_StartDate_Time that is an ISO 8601 date/time string to the dataset.",
1042 "DODS_StartDate_Time( [Sequence or Structure] )",
1043 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1044 "https://services.opendap.org/dap4/freeform-function/DODS_StartDate_Time",
1045 proj_dods_startdate_time
1047 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1049 ff_dap_function =
new libdap::ServerFunction(
1050 "DODS_EndDate_Time",
1052 "Adds a variable named DODS_EndDate_Time that is an ISO 8601 date/time string to the dataset.",
1053 "DODS_EndDate_Time( [Sequence or Structure] )",
1054 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1055 "https://services.opendap.org/dap4/freeform-function/DODS_EndDate_Time",
1056 proj_dods_enddate_time
1058 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1060 ff_dap_function =
new libdap::ServerFunction(
1061 "DODS_Decimal_Year",
1063 "Adds a variable named DODS_Decimal_Year that is date as a decimal year/day value string to the dataset.",
1064 "DODS_Decimal_Year( [Sequence or Structure] )",
1065 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1066 "https://services.opendap.org/dap4/freeform-function/DODS_Decimal_Year",
1067 proj_dods_decimal_year
1069 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1071 ff_dap_function =
new libdap::ServerFunction(
1072 "DODS_StartDecimal_Year",
1074 "Adds a variable named DODS_StartDecimal_Year that is date as a decimal year/day value string to the dataset.",
1075 "DODS_StartDecimal_Year( [Sequence or Structure] )",
1076 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1077 "https://services.opendap.org/dap4/freeform-function/DODS_StartDecimal_Year",
1078 proj_dods_startdecimal_year
1080 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
1082 ff_dap_function =
new libdap::ServerFunction(
1083 "DODS_EndDecimal_Year",
1085 "Adds a variable named DODS_EndDecimal_Year that is date as a decimal year/day value string to the dataset.",
1086 "DODS_EndDecimal_Year( [Sequence or Structure] )",
1087 "https://docs.opendap.org/index.php/Server_Side_Processing_Functions#FreeForm_Functions",
1088 "https://services.opendap.org/dap4/freeform-function/DODS_EndDecimal_Year",
1089 proj_dods_enddecimal_year
1091 libdap::ServerFunctionsList::TheList()->add_function(ff_dap_function);
string get(date_format format=ymd, bool gmt=true) const
string get(date_format format=ymd) const
string get(bool gmt=true) const