Bitcoin Cash difficulty before first hard fork: Emergency Difficulty Adjustment (EDA)
The first rule is well understood.
The second rule, ensures that difficulty gets readjusted quicker if the MTP between blocks is big (12h.)   

In practice:
Check the MTP of the current block (mining time of a block 6 blocks earlier)
compare to the MTP time of a block mind 6 blocks earlier
if the difference is 12 hours then difficulty will reset
for example:
block 478574 has an MTP of Aug 1 14:39: UTC
block 478568 has an MTP of Aug 1  11:52 UTC
so not yet 12 hours apart   

also see: https://medium.com/@jimmysong/bitcoin-cash-difficulty-adjustments-2ec589099a8e (edit: fixed link)