Add GetDateOnly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
627ddac99e
commit
6a6c9417a8
@ -464,6 +464,10 @@ public:
|
||||
// resets time to 00:00:00, doesn't change the date
|
||||
wxDateTime& ResetTime();
|
||||
|
||||
// get the date part of this object only, i.e. the object which has the
|
||||
// same date as this one but time of 00:00:00
|
||||
wxDateTime GetDateOnly() const;
|
||||
|
||||
// the following functions don't change the values of the other
|
||||
// fields, i.e. SetMinute() won't change either hour or seconds value
|
||||
|
||||
|
@ -3639,6 +3639,10 @@ class DateTime(object):
|
||||
"""ResetTime(self) -> DateTime"""
|
||||
return _misc_.DateTime_ResetTime(*args, **kwargs)
|
||||
|
||||
def GetDateOnly(*args, **kwargs):
|
||||
"""GetDateOnly(self) -> DateTime"""
|
||||
return _misc_.DateTime_GetDateOnly(*args, **kwargs)
|
||||
|
||||
def SetYear(*args, **kwargs):
|
||||
"""SetYear(self, int year) -> DateTime"""
|
||||
return _misc_.DateTime_SetYear(*args, **kwargs)
|
||||
|
@ -24458,6 +24458,34 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_GetDateOnly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
wxDateTime result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject *swig_obj[1] ;
|
||||
|
||||
if (!args) SWIG_fail;
|
||||
swig_obj[0] = args;
|
||||
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetDateOnly" "', expected argument " "1"" of type '" "wxDateTime const *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxDateTime * >(argp1);
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = ((wxDateTime const *)arg1)->GetDateOnly();
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_SetYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
@ -39731,6 +39759,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"DateTime_SetHMS", (PyCFunction) _wrap_DateTime_SetHMS, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_Set", (PyCFunction) _wrap_DateTime_Set, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_ResetTime", (PyCFunction)_wrap_DateTime_ResetTime, METH_O, NULL},
|
||||
{ (char *)"DateTime_GetDateOnly", (PyCFunction)_wrap_DateTime_GetDateOnly, METH_O, NULL},
|
||||
{ (char *)"DateTime_SetYear", (PyCFunction) _wrap_DateTime_SetYear, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetMonth", (PyCFunction) _wrap_DateTime_SetMonth, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetDay", (PyCFunction) _wrap_DateTime_SetDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
@ -3639,6 +3639,10 @@ class DateTime(object):
|
||||
"""ResetTime(self) -> DateTime"""
|
||||
return _misc_.DateTime_ResetTime(*args, **kwargs)
|
||||
|
||||
def GetDateOnly(*args, **kwargs):
|
||||
"""GetDateOnly(self) -> DateTime"""
|
||||
return _misc_.DateTime_GetDateOnly(*args, **kwargs)
|
||||
|
||||
def SetYear(*args, **kwargs):
|
||||
"""SetYear(self, int year) -> DateTime"""
|
||||
return _misc_.DateTime_SetYear(*args, **kwargs)
|
||||
|
@ -24450,6 +24450,34 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_GetDateOnly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
wxDateTime result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject *swig_obj[1] ;
|
||||
|
||||
if (!args) SWIG_fail;
|
||||
swig_obj[0] = args;
|
||||
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetDateOnly" "', expected argument " "1"" of type '" "wxDateTime const *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxDateTime * >(argp1);
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = ((wxDateTime const *)arg1)->GetDateOnly();
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_SetYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
@ -39792,6 +39820,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"DateTime_SetHMS", (PyCFunction) _wrap_DateTime_SetHMS, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_Set", (PyCFunction) _wrap_DateTime_Set, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_ResetTime", (PyCFunction)_wrap_DateTime_ResetTime, METH_O, NULL},
|
||||
{ (char *)"DateTime_GetDateOnly", (PyCFunction)_wrap_DateTime_GetDateOnly, METH_O, NULL},
|
||||
{ (char *)"DateTime_SetYear", (PyCFunction) _wrap_DateTime_SetYear, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetMonth", (PyCFunction) _wrap_DateTime_SetMonth, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetDay", (PyCFunction) _wrap_DateTime_SetDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
@ -3639,6 +3639,10 @@ class DateTime(object):
|
||||
"""ResetTime(self) -> DateTime"""
|
||||
return _misc_.DateTime_ResetTime(*args, **kwargs)
|
||||
|
||||
def GetDateOnly(*args, **kwargs):
|
||||
"""GetDateOnly(self) -> DateTime"""
|
||||
return _misc_.DateTime_GetDateOnly(*args, **kwargs)
|
||||
|
||||
def SetYear(*args, **kwargs):
|
||||
"""SetYear(self, int year) -> DateTime"""
|
||||
return _misc_.DateTime_SetYear(*args, **kwargs)
|
||||
|
@ -24450,6 +24450,34 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_GetDateOnly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
wxDateTime result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject *swig_obj[1] ;
|
||||
|
||||
if (!args) SWIG_fail;
|
||||
swig_obj[0] = args;
|
||||
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetDateOnly" "', expected argument " "1"" of type '" "wxDateTime const *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxDateTime * >(argp1);
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = ((wxDateTime const *)arg1)->GetDateOnly();
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_SetYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
@ -39792,6 +39820,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"DateTime_SetHMS", (PyCFunction) _wrap_DateTime_SetHMS, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_Set", (PyCFunction) _wrap_DateTime_Set, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_ResetTime", (PyCFunction)_wrap_DateTime_ResetTime, METH_O, NULL},
|
||||
{ (char *)"DateTime_GetDateOnly", (PyCFunction)_wrap_DateTime_GetDateOnly, METH_O, NULL},
|
||||
{ (char *)"DateTime_SetYear", (PyCFunction) _wrap_DateTime_SetYear, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetMonth", (PyCFunction) _wrap_DateTime_SetMonth, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetDay", (PyCFunction) _wrap_DateTime_SetDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
Loading…
Reference in New Issue
Block a user