# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/utils/convert.ipynb.

# %% auto 0
__all__ = ['convert_epoch_millisecond_to_datetime', 'convert_datetime_to_epoch_millisecond', 'convert_snake_to_pascal']

# %% ../../nbs/utils/convert.ipynb 2
import datetime as dt

# %% ../../nbs/utils/convert.ipynb 3
import fastcore.test as fctest

# %% ../../nbs/utils/convert.ipynb 4
def convert_epoch_millisecond_to_datetime(epoch: int):
    '''convert Epoch time with miliseconds to Date time'''
    return dt.datetime.fromtimestamp(epoch / 1000.0)

# %% ../../nbs/utils/convert.ipynb 5
def convert_datetime_to_epoch_millisecond(datetime: dt.datetime):
    '''convert DateTime to Epoch time with Miliseconds'''
    return int(datetime.timestamp() * 1000)

# %% ../../nbs/utils/convert.ipynb 8
def convert_snake_to_pascal(str):
    """converts 'snake_case_str' to 'snakeCaseStr'"""
    
    clean_str = str.replace("_", " ").title().replace(" ", "")
    return clean_str[0].lower()+clean_str[1:]
