<commit_before>{% load class_tags %}

{% if not task.is_event_completed %}
<div {% get_id_and_classes "task-reminder"%}>
  <p>
    {% if reminders.email or reminders.text %}
      {% if reminders.email %}
      Email reminder: {{reminders.email.send_at}}<br/>
      {% endif %}
      {% if reminders.text %}
      Text reminder: {{reminders.text.send_at}}<br/>
      {% endif %}
      <button {% get_id_and_classes "task-reminder-button" %}>Change Reminder</button>
    {% else %}
    Get a text or email reminder
    <button {% get_id_and_classes "task-reminder-button" %}>Remind Me</button>
    {% endif %}
  </p>
</div>

<div {% get_id_and_classes "task-reminder-dialog" %} title="Remind Me" style="display: none">
  {% include "view_activities/reminder_form.html" %}
</div>

<script type="text/javascript">
  jQuery(document).ready(function($) {
    $("#task-reminder-dialog").dialog({
      modal: true,
      autoOpen: false,
      width: 650,
      open: function (event, ui) {
        log_js_action("{{task.type}}", "{{task.slug}}", "reminder-open");
      },
      close: function(event, ui) {
        log_js_action("{{task.type}}", "{{task.slug}}", "reminder-close");
      }
    });
    
    $("#task-reminder-button").click(function() {
      $("#task-reminder-dialog").dialog("open");
    });
    
    function createDateString(offset) {
      var d = new Date('{{task.activity.event_date|date:"r"}}');
      // Subtract the milliseconds from the event date.
      d = new Date(d.getTime() - (offset * 60 * 60 * 1000));
      var hour = d.getHours();
      var minutes = d.getMinutes();
      var ampm = "AM";
      if (hour >= 12) {
        hour = hour - 12;
        ampm = "PM";
      }
      else if (hour == 0) {
        hour = 12;
      }<commit_msg>Adjusted date string in reminder to handle hours > 12 rather than >=.  Close #449<commit_after>{% load class_tags %}

{% if not task.is_event_completed %}
<div {% get_id_and_classes "task-reminder"%}>
  <p>
    {% if reminders.email or reminders.text %}
      {% if reminders.email %}
      Email reminder: {{reminders.email.send_at}}<br/>
      {% endif %}
      {% if reminders.text %}
      Text reminder: {{reminders.text.send_at}}<br/>
      {% endif %}
      <button {% get_id_and_classes "task-reminder-button" %}>Change Reminder</button>
    {% else %}
    Get a text or email reminder
    <button {% get_id_and_classes "task-reminder-button" %}>Remind Me</button>
    {% endif %}
  </p>
</div>

<div {% get_id_and_classes "task-reminder-dialog" %} title="Remind Me" style="display: none">
  {% include "view_activities/reminder_form.html" %}
</div>

<script type="text/javascript">
  jQuery(document).ready(function($) {
    $("#task-reminder-dialog").dialog({
      modal: true,
      autoOpen: false,
      width: 650,
      open: function (event, ui) {
        log_js_action("{{task.type}}", "{{task.slug}}", "reminder-open");
      },
      close: function(event, ui) {
        log_js_action("{{task.type}}", "{{task.slug}}", "reminder-close");
      }
    });
    
    $("#task-reminder-button").click(function() {
      $("#task-reminder-dialog").dialog("open");
    });
    
    function createDateString(offset) {
      var d = new Date('{{task.activity.event_date|date:"r"}}');
      // Subtract the milliseconds from the event date.
      d = new Date(d.getTime() - (offset * 60 * 60 * 1000));
      var hour = d.getHours();
      var minutes = d.getMinutes();
      var ampm = "AM";
      if (hour > 12) {
        hour = hour - 12;
        ampm = "PM";
      }
      else if (hour == 0) {
        hour = 12;
      }
{'fraction_non_alphanumeric': 0.18207049680821538, 'fraction_numerical': 0.011379406050513461, 'mean_word_length': 2.6964102564102563, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '374966', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1223, 'n_words': 260}