title: Parse date to cron format in javscript
body: <p>I have a UI that the user choose the following:</p>
  <p>days in weeks [array]</p>
  <p>hours , minutes, and AM/PM</p>
  <p>for example:</p>
  <p>Sunday, Monday , in 01:00:AM</p>
  <p>How can I parse this data to a cron format</p>
  <p>the Ui include checkboxes for the days and hours/minutes select box for the  Time</p>
  <p>also - how can I do the opposite
  From cron to UI data:</p>
  <p>for example my cron</p>
  <pre><code>0 2 2 ? * SUN,MON *
  At 02:02:00am, on every Sunday and Monday, every month
  ``
  </code></pre>