$comments = get_comments([
'status' => 'approve',
'number' => 5,
'date_query' => [
'before' => 'now',
'inclusive' => false,
],
]);
<?php
$number_class = "";
$number = get_field('number');
if($number < 50){
$number_class = "bad";
}
else {
$number_class = "good";
}
?>
<div id="parent" class="<?php echo $number_class; ?>">
<span style="width:<?php the_field('number'); ?>%;">
<span class="childclass"><?php the_field('number'); ?>
</span>
</span>
</div>