Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some types from chrono #165

Open
5 tasks done
v1gnesh opened this issue Mar 24, 2024 · 1 comment
Open
5 tasks done

Add some types from chrono #165

v1gnesh opened this issue Mar 24, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@v1gnesh
Copy link
Contributor

v1gnesh commented Mar 24, 2024

I had a look and I have to say... your clarity in thinking reflects in the code base.
However, it's way over my head at the moment.
Is it right that additions will be to a new src/array/temporal.rs, where we'd want to convert the above to -

Date:
Date32Type

Time:
Time32MillisecondType
Time32SecondType

Duration:
DurationSecondType
DurationNanosecondType
DurationMillisecondType
DurationMicrosecondType

When you have time to get into this, if you can show how to implement one in each of these groups (or maybe just one overall?), I might be able to understand what's needed then and help with the remaining.

Sample code in case it helps
#[derive(Debug)]
// #[derive(Debug, ArrayType)]
pub struct OrdinalDate0(pub(crate) Option<NaiveDate>);

#[derive(Debug)]
// #[derive(Debug, ArrayType)]
pub struct HhMmSs0(pub(crate) Option<NaiveTime>);

#[derive(Debug)]
// #[derive(Debug, ArrayType)]
pub struct Chrony0 {
    t: HhMmSs0,
    d: OrdinalDate0,
}

fn main() {

    let chrony0 = Chrony0 {
        t: HhMmSs0(Some(NaiveTime::default())),
        d: OrdinalDate0(Some(NaiveDate::default())),
    };
    
    println!("{:#?}", chrony0);
   
}
@mbrobbel mbrobbel added the enhancement New feature or request label Mar 28, 2024
@mbrobbel mbrobbel added help wanted Extra attention is needed good first issue Good for newcomers labels Aug 15, 2024
@v1gnesh
Copy link
Contributor Author

v1gnesh commented Aug 17, 2024

A quick comment to say NaiveDateTime seems to be working. I haven't yet looked into how/whether DateTime and NaiveDateTime are internally related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants