Code example of how to pro-rate Fixed Calendar Year Membership in CiviCRM
I ended up using the buildAmount hook - (in a custom extension) - very similar to how CiviDiscount works! July 01 is the roll over day. After that we don't need to discount anymore. This is my first pass at it:

function membershippro_civicrm_buildAmount($pageType, &amp;$form, &amp;$amounts) {

  //retrieve price set field associated with this priceset
  $priceSetInfo = CRM_CiviDiscount_Utils::getPriceSetsInfo($psid);
  $originalAmounts = $amounts;

  $discountApplied = FALSE;
    foreach ($amounts as $fee_id =&gt; &amp;$fee) {
    if (!is_array($fee['options'])) {
      continue;
    }

  foreach ($fee['options'] as $option_id =&gt; &amp;$option) {
    $originalLabel = $originalAmounts[$fee_id]['options'][$option_id]['label'];
    $originalAmount = CRM_Utils_Rule::cleanMoney($originalAmounts[$fee_id]['options'][$option_id]['amount']);

    $now = time(); // or your date as well
    $to_date = strtotime("2017-07-01");
    $datediff = $to_date - $now;

    $num_days = floor($datediff / (60 * 60 * 24));

    if ($num_days &gt;= 1) {
      $discountAmount = $originalAmounts[$fee_id]['options'][$option_id]['amount'] * $num_days / 365;
    }

    $amount = $originalAmount - $discountAmount;

    $option['amount'] = $amount;
    $option['discount_applied'] = $discountAmount;

    $recalculateTaxAmount = array();
    if (array_key_exists('tax_amount', $originalAmounts[$fee_id]['options'][$option_id]) &amp;&amp;
      array_key_exists('tax_rate', $originalAmounts[$fee_id]['options'][$option_id])
    ) {
      $recalculateTaxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($amount, $originalAmounts[$fee_id]['options'][$option_id]['tax_rate']);
        if (!empty($recalculateTaxAmount)) {
          $option['tax_amount'] = round($recalculateTaxAmount['tax_amount'], 2);
        }
      }

        $discountApplied = TRUE;

      }
    }
}