<commit_before>-module(builderl_dtl_filters).

-behaviour(erlydtl_library).

-export([version/0,
         inventory/1]).

-export([sToDatetime/1]).

version() ->
  1.

inventory(filters) ->
  [sToDatetime];
inventory(tags) ->
  [].


sToDatetime(Seconds) when is_integer(Seconds)->
    io:format("huh? ~p~n", [Seconds]),
    {Date, Time} = secondsToDateAndTime(Seconds),
    formatDate(Date, Time);
sToDatetime(Seconds) ->
    io:format("huh? ~p~n", [Seconds]),
    ["foob"].

formatDate({Y, Mo, D}, {H, Mi, S}) ->
    [integer_to_list(Y), "-",
     integer_to_list(Mo), "-",
     integer_to_list(D), " ",
     integer_to_list(H), ":",
     integer_to_list(Mi), ":",
     integer_to_list(S)].


secondsToDateAndTime(TotalSeconds) ->
    BaseDate      = calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}}),
    Seconds       = BaseDate + TotalSeconds,
    {Date, Time} = calendar:gregorian_seconds_to_datetime(Seconds),
    {Date, Time}.<commit_msg>Don’t need to log when things are working<commit_after>-module(builderl_dtl_filters).

-behaviour(erlydtl_library).

-export([version/0,
         inventory/1]).

-export([sToDatetime/1]).

version() ->
  1.

inventory(filters) ->
  [sToDatetime];
inventory(tags) ->
  [].


sToDatetime(Seconds) when is_integer(Seconds)->
    {Date, Time} = secondsToDateAndTime(Seconds),
    formatDate(Date, Time);
sToDatetime(Seconds) ->
    io:format("huh? ~p~n", [Seconds]),
    ["foob"].

formatDate({Y, Mo, D}, {H, Mi, S}) ->
    [integer_to_list(Y), "-",
     integer_to_list(Mo), "-",
     integer_to_list(D), " ",
     integer_to_list(H), ":",
     integer_to_list(Mi), ":",
     integer_to_list(S)].


secondsToDateAndTime(TotalSeconds) ->
    BaseDate      = calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}}),
    Seconds       = BaseDate + TotalSeconds,
    {Date, Time} = calendar:gregorian_seconds_to_datetime(Seconds),
    {Date, Time}.
{'fraction_non_alphanumeric': 0.18654755648975302, 'fraction_numerical': 0.013662637940094587, 'mean_word_length': 3.9454545454545453, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3075138', 'n_tokens_mistral': 729, 'n_tokens_neox': 706, 'n_words': 101}