lib: add regression test for n_m_get_date; clarify API