PythonMonkey   v0.8.2 (dev)
Loading...
Searching...
No Matches
DateType Struct Reference

This struct represents the 'datetime' type in Python from the datetime module, which is represented as a 'Date' object in JS. More...

#include <DateType.hh>

Static Public Member Functions

static PyObject * getPyObject (JSContext *cx, JS::HandleObject dateObj)
 Convert a JS Date object to Python datetime.
 
static JSObject * toJsDate (JSContext *cx, PyObject *pyObject)
 Convert a Python datetime object to JS Date.
 

Detailed Description

This struct represents the 'datetime' type in Python from the datetime module, which is represented as a 'Date' object in JS.

Member Function Documentation

◆ getPyObject()

PyObject * DateType::getPyObject ( JSContext *  cx,
JS::HandleObject  dateObj 
)
static

Convert a JS Date object to Python datetime.

◆ toJsDate()

JSObject * DateType::toJsDate ( JSContext *  cx,
PyObject *  pyObject 
)
static

Convert a Python datetime object to JS Date.

Parameters
cx- javascript context pointer
pyObject- the python datetime object to be converted

The documentation for this struct was generated from the following files: