You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement chrono Datetime in jrsonnet as a type so that it can be used in custom jrsonnet methods as a type and can be returned from jrsonnet method as a type
#166
Open
redoC-A2k opened this issue
Jun 1, 2024
· 1 comment
For example suppose I have a method date
/// Returns current date and time in utc
#[builtin]
fn date(
dateTime: Option,
timeStamp: Option,
year: Option,
monthIndex: Option,
day: Option,
hours: Option,
minutes: Option,
seconds: Option,
milliseconds: Option,
)
Now I want to return chrono::Datetime from above method and then in another method suppose ,
#[builtin]
fn format_date
I want to take chrono::Datetime object/struct as argument and return string .
Please could you provide help ?
The text was updated successfully, but these errors were encountered:
I don't quite understand what do you want. Provide Typed implementation for chrono::Datetime, which will automatically convert it to String for jsonnet code, and back?
For example suppose I have a method date
/// Returns current date and time in utc
#[builtin]
fn date(
dateTime: Option,
timeStamp: Option,
year: Option,
monthIndex: Option,
day: Option,
hours: Option,
minutes: Option,
seconds: Option,
milliseconds: Option,
)
Now I want to return chrono::Datetime from above method and then in another method suppose ,
#[builtin]
fn format_date
I want to take chrono::Datetime object/struct as argument and return string .
Please could you provide help ?
The text was updated successfully, but these errors were encountered: